Skip to content
D DocNectar

Free Tangent Calculator

Calculate tan(θ) for any angle, entered in degrees or radians, with undefined cases handled clearly.

100% Free No Signup Works on all devices

Built and fact-checked by the DocNectar team — see our editorial standards

Thanks for rating!

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.

  1. Enter angle (θ).
  2. Enter angle unit.
  3. 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.

Frequently asked questions

Because tan(θ) = sin(θ)/cos(θ), and cos(90°) = 0. Division by zero is mathematically undefined, so rather than approaching a specific number, tan(θ) shoots toward positive infinity as θ approaches 90° from below and toward negative infinity approaching from above.
At 90° + 180°n for any integer n — that is, 90°, 270°, 450°, -90°, -270°, and so on, repeating every 180° rather than every 360° like sine and cosine.
Sine and cosine both flip sign after 180° (e.g., sin(210°) = -sin(30°) and cos(210°) = -cos(30°)), but since tangent is their ratio, the two sign flips cancel out, giving tan(210°) = tan(30°). That shorter period is a distinguishing feature of tangent compared to sine and cosine.
Yes — unlike sine and cosine, which are always confined between -1 and 1, tangent has no upper or lower bound. It can equal 1,000,000 or -1,000,000 for angles just fractions of a degree away from where it becomes undefined.
If a line makes an angle θ with the horizontal, its slope is exactly tan(θ). A 45° incline has a slope of 1 (rises 1 unit for every 1 unit forward); a steeper 60° incline has a slope of √3 ≈ 1.73.
Tangent takes an angle and returns a ratio (which can be any real number). Arctan (inverse tangent) does the reverse — it takes a ratio and returns an angle, always between -90° and 90°.
Most calculators are designed to raise a math error at genuinely undefined points rather than display a huge floating-point number, which matches this tool's behavior — though calculators using a rounded internal angle (like 89.999999° instead of exactly 90°) can sometimes slip through and show an enormous but technically defined number.

Get new calculators and guides in your inbox

No spam — just new tools like Tangent Calculator and practical guides.

Favorites