Tangent Calculator

Solve tangent ratio or angle.

About the Tangent Calculator

Tangent is sine divided by cosine, and represents the slope of a line at a given angle. It runs to infinity at right angles.

How to use it

  1. Enter the angle in radians.
  2. Read the tangent value.

The formula

Tangent is opposite over adjacent — TOA. Unlike sine and cosine it has no hypotenuse in it, and no upper limit.

tan(θ) = Opposite ÷ Adjacent
θ = arctan(Opposite ÷ Adjacent)

That makes tangent the trigonometry of slope. Rise over run is exactly the tangent of the angle of inclination, which is why it is the function behind roof pitch, road gradient, wheelchair ramps, drainage falls and the gradient of a line on a graph.

It also explains the one thing tangent does that the others do not: at 90° the adjacent side is zero and the ratio is undefined. Approaching vertical, tangent runs away to infinity — tan(89°) is already 57.3. A vertical wall has no gradient expressible as a percentage, which is a real limitation in surveying and not a quirk of notation.

Worked examples

Rise : Runtan(θ)AngleAs a gradeTypical use
1 : 120.08334.76°8.3%accessible ramp maximum
3 : 120.250014.04°25%low roof pitch
6 : 120.500026.57°50%common roof pitch
12 : 121.000045.00°100%the exact diagonal

The last row is the one people misread. A 100% grade is not vertical — it is 45°, where rise equals run. Grade is a tangent expressed as a percentage, not a fraction of the way to upright, so gradients above 100% are perfectly possible. This is why builders quote roof pitch as a ratio rather than an angle: 6:12 is directly measurable with a tape, while 26.57° is not.

Common mistakes

Terms explained

Tangent
Opposite divided by adjacent. Numerically identical to the slope of a line at that angle.
Grade
Slope as a percentage: rise divided by run, times 100. A 6% road grade rises six feet per hundred travelled horizontally.
Pitch
Roof slope expressed as rise per 12 units of run, such as 4:12. The building trade's standard notation.
Arctangent
The inverse function, written tan−¹ or atan. Converts a slope back into an angle.
atan2
A two-argument arctangent used in programming. It takes rise and run separately so it can return the correct angle in all four quadrants, and it does not divide by zero.
Asymptote
A value a function approaches without reaching. Tangent has one at 90°, which is why it is undefined there.

Common questions

What is the difference between grade, pitch and angle?
They describe the same slope three ways. Grade is a percentage, pitch is rise per 12 of run, and the angle is the arctangent of the ratio. A 6:12 pitch is a 50% grade and 26.57°.
Why is tan(90°) undefined?
Because the adjacent side is zero and you cannot divide by zero. As the angle approaches 90°, tangent grows without limit — tan(89.9°) is over 570.
How do I find the angle of a roof or ramp?
Divide the rise by the horizontal run and take the arctangent. A 1:12 accessible ramp is arctan(0.0833), or about 4.76°.
Can tangent be greater than 1?
Yes, for any angle above 45°, where the opposite side exceeds the adjacent one. Unlike sine and cosine, tangent has no ceiling.
What does a 6% road grade mean?
The road rises six feet for every hundred feet of horizontal distance, an angle of about 3.43°. Highway signs use grade because it is far easier to standardise than degrees.
What is atan2 and why would I use it?
A programming function taking rise and run as two arguments rather than their ratio. It returns the correct angle in every quadrant and handles a run of zero, which plain arctangent cannot.
Is tangent the same as the slope of a line?
Yes. A line with slope m makes an angle of arctan(m) with the horizontal, which is why gradients and angles are interchangeable descriptions.
How does this relate to sine and cosine?
tan(θ) = sin(θ) ÷ cos(θ). It is undefined exactly where cosine is zero, which is at 90° — the division by zero, seen from another direction.

Related calculators

← All 51 calculators