Tangent Calculator
Calculate tangent function tan(θ), line slope m, and inverse tangent arctan(x) step-by-step for angles in degrees or radians.
Tangent & Inverse Tangent Evaluation Engine
Select calculation mode and enter input parameters.
Tangent Evaluation Output
Quick Summary
Our tangent calculator tan angle slope degrees radians steps tool computes the tangent ratio $\tan\theta = \frac{\text{Opposite}}{\text{Adjacent}}$, line slope $m$, grade percentages, and inverse tangent $\arctan(x)$ for any angle in degrees or radians.
How It Works: Opposite/Adjacent Ratio & Line Slope
The tangent function measures the slope ratio of an angle:
1. **Right-Triangle Ratio:** $\tan\theta = \frac{\text{Opposite Side}}{\text{Adjacent Side}} = \\sin\theta / \cos\theta$.
2. **Line Slope Definition:** $\tan\theta = m = \\Delta y / \Delta x$ (rise over run of a straight line).
3. **Inverse Tangent ($\arctan(x)$):** Given slope or ratio $x \in (-\infty, \infty)$, computes principal angle $\theta$ in range $(-90^\circ, 90^\circ)$.
4. **Vertical Asymptotes:** Undefined at odd multiples of $90^\circ$ ($\\pi / 2, \3\pi / 2, \dots$) because $\cos\theta = 0$.
5. **Taylor Maclaurin Power Series:** $\tan x = x + \x^3 / 3 + \2x^5 / 15 + \17x^7 / 315 + \dots$.
Formula Explanation
Your tangent calculations follow fundamental geometric and slope formulas:
Step-by-Step Worked Example
Here is a detailed 5-step breakdown for evaluating $\tan(45^\circ)$:
- Step 1 (Convert Angle to Radians): $\theta = 45^\circ \times \\pi / 180^\circ = \\pi / 4 \approx \mathbf{0.7854 \text{ rad}}$.
- Step 2 (Apply Opposite/Adjacent Ratio): For an isosceles 45-45-90 right triangle with opposite side 1 and adjacent side 1: $\tan(45^\circ) = \1 / 1 = \mathbf{1.0000}$.
- Step 3 (Calculate Cotangent Reciprocal): $\cot(45^\circ) = \1 / \tan(45^\circ) = \1 / 1 = \mathbf{1.0000}$.
- Step 4 (Compute Line Slope & Road Grade): Line slope $m = \tan(45^\circ) = 1.0000 \implies \text{Grade \%} = 1.0000 \times 100\% = \mathbf{100\% \text{ Grade}}$.
- Step 5 (Verify Secant Identity): $1 + \tan^2(45^\circ) = 1 + 1^2 = 2 = (\sqrt{2})^2 = \sec^2(45^\circ)$, delivering **tan(45°) = 1, cot(45°) = 1**!
Calculation Examples: Real-World Scenario Comparison
Compare tangent angles, inverse arctan inputs, line slopes, and road grade percentages:
| Calculation Input | Tangent Value tan(θ) / Angle θ | Exact Radical Form | Line Slope m | Road Grade % |
|---|---|---|---|---|
| 45° (π/4) | 1.0000 | 1 | 1.0000 | 100% |
| 30° (π/6) | 0.5774 | √3 / 3 | 0.5774 | 57.74% |
| arctan(1.7321) | 60.00° (1.0472 rad) | π/3 rad | 1.7321 | 173.21% |
| 90° (π/2) | Undefined (Asymptote) | Vertical Line | ∞ | Vertical Slope |
Benefits of Using the Tangent Calculator
Utilizing this calculator provides essential civil engineering road incline calculations, surveying building height measurements, and computer graphics slope angle advantages:
- Civil Engineering Road & Ramp Incline: Calculates road steepness grade percentage ($\text{Grade} = \tan\theta \times 100\%$).
- Surveying Height & Distance Triangulation: Computes unknown building heights using distance and elevation angle ($h = d \tan\theta$).
- Computer Graphics & Game Engine Camera Angles: Converts field-of-view (FOV) angles to projection matrix frustum ratios.
- Handles Arctan Domain (-∞ to +∞): Evaluates inverse tangent for any real number slope input without range errors.
Frequently Asked Questions (FAQ)
What is tangent (tan) in trigonometry?
Tangent is the trigonometric function of an angle defined as the ratio of the length of the opposite side to the length of the adjacent side in a right triangle (tan(θ) = opposite / adjacent).
What is the range of the tangent function?
The range of tan(θ) is all real numbers from negative infinity to positive infinity ((-∞, +∞)).
What is inverse tangent (arctan / tan⁻¹)?
Inverse tangent (arctan) is the inverse function of tangent that takes any real ratio/slope x and returns the principal angle θ in range (-90°, 90°).
Why is tan(90°) undefined?
tan(90°) = sin(90°) / cos(90°) = 1 / 0. Division by zero creates an infinite vertical asymptote.
What is tan(0°), tan(30°), tan(45°), tan(60°)?
tan(0°) = 0, tan(30°) = √3/3 (≈ 0.5774), tan(45°) = 1, tan(60°) = √3 (≈ 1.7321).
Is tangent an even or odd function?
Tangent is an ODD function: tan(-θ) = -tan(θ).
What is the period of the tangent function?
The period of tan(θ) is 180° or π radians (tan(θ + π) = tan(θ)). Note that sine and cosine have periods of 360° (2π).
What is the reciprocal of tangent?
The reciprocal of tangent is cotangent: cot(θ) = 1 / tan(θ) = adjacent / opposite.
How does line slope relate to tangent?
The slope m of a straight line equals the tangent of its angle of inclination with the positive X-axis: m = tan(θ).
What is `atan2(y, x)` in programming?
`atan2(y, x)` is a 2-argument inverse tangent function that computes the exact angle θ in all 4 quadrants (-180° to +180°) by analyzing signs of x and y.