Built and fact-checked by the DocNectar team — see our editorial standards
Key Features
Instant Calculation
Get accurate results in real time with our optimized algorithm.
Mobile Friendly
Fully responsive design. Works on all devices & screen sizes.
Privacy Focused
Your data stays on your device. We don't store any inputs.
100% Free
No hidden costs. This tool is completely free forever.
Tangent is defined as sin(θ)/cos(θ), equivalent to the ratio of the opposite side to the adjacent side in a right triangle. Geometrically, tan(θ) is also the slope of the line from the origin to the point at angle θ on the unit circle — which is why it connects so directly to real slopes, grades, and inclines. Tangent is the workhorse trig function for anything involving a rise-over-run relationship: calculating the slope of a road or roof from its angle, finding the angle of elevation of the sun or a building from a shadow's length, working out grades in civil engineering, and deriving the slope-angle relationship used throughout calculus and physics. Because it's built from a ratio, tangent is undefined wherever cosine is zero — at 90°, 270°, and every 180° interval from those points — and this calculator flags those cases explicitly rather than returning a meaningless huge number.
How it works
The calculator first computes sin(θ) and cos(θ) for whatever angle you enter (converting from degrees to radians internally if needed, since most math libraries work natively in radians), then divides the two: tan(θ) = sin(θ) ÷ cos(θ). Because this is a genuine ratio, tan(θ) can take on any real value at all — unlike sine and cosine, which are capped between -1 and 1 — and it grows without bound as θ approaches 90° from either side. Whenever cos(θ) evaluates to zero, the calculator reports the result as "undefined" rather than a floating-point approximation of infinity.
- Enter angle (θ).
- Enter angle unit.
- Click Calculate to see your results.
Examples
tan(45°)
tan(45°) = 1 exactly, since sin(45°) = cos(45°) = √2/2, and dividing equal values always gives 1.
tan(30°)
tan(30°) = 1/√3 ≈ 0.577, since sin(30°) = 0.5 and cos(30°) = √3/2 ≈ 0.866, and 0.5 ÷ 0.866 ≈ 0.577.
tan(90°)
tan(90°) is undefined, because cos(90°) = 0 and dividing by zero has no defined value — this is the single most important edge case to understand about the tangent function.
Common mistakes to avoid
- Expecting a very large finite number instead of the mathematically correct "undefined" result at 90°, 270°, and similar angles.
- Forgetting tangent repeats every 180°, not 360° — so tan(30°) and tan(210°) are the same value, unlike sin(30°) and sin(210°), which are opposite.
- Confusing tan(θ) with cotangent (cot θ = 1/tan θ = cos θ/sin θ), which is undefined at 0°/180° instead of 90°/270°.
- Assuming tangent is bounded like sine and cosine — it is not, and can produce arbitrarily large positive or negative values.