Tangent Calculator

Enter an angle in degrees or radians to compute its tangent.

How it is calculated

The angle is first converted to radians if it was given in degrees: rad = degrees × π / 180. Then tan(θ) = sin(θ) / cos(θ) and the cotangent is 1 / tan(θ). All three values (tangent, angle in radians, cotangent) are shown to 6 decimals. The angle may be negative or larger than 360 degrees, since tangent repeats every 180 degrees. At 90, 270 and every 90 + k × 180 degrees the cosine is zero, so the tangent is undefined and the tool gives no result. At 0, 180 and other multiples of 180 degrees the tangent is 0 and the cotangent is undefined, so a dash is shown for it.

Worked example

Angle 60 degrees. Convert to radians: 60 × π / 180 = 1.047198 rad. Then tan 60° = sin 60° / cos 60° = 0.866025 / 0.5 = 1.732051. The cotangent is the reciprocal: 1 / 1.732051 = 0.577350. Since 1.732051 is the square root of 3, a 60 degree slope rises about 1.73 units for each unit of run.

Try this example →

Common mistakes

  • Leaving the unit on degrees while typing a radian value. Entering 1 as degrees gives 0.017455, but 1 radian gives 1.557408.
  • Entering a slope percentage as the angle. A 100 percent grade is 45 degrees, not 100 degrees.
  • Expecting a number at 90 or 270 degrees. The tangent is undefined there, so the tool shows no result instead of a huge value.
  • Reading the dash in the cotangent column as an error. It appears at 0 and 180 degrees, where the tangent is zero and its reciprocal does not exist.
  • Confusing cotangent with inverse tangent. The reciprocal column is 1 / tan(θ); it is not arctan, which finds an angle from a ratio.

About this calculator

The tangent of an angle is the ratio of the length of the side opposite it to the side adjacent to it in a right triangle, equivalently defined as sin(θ)/cos(θ) on the unit circle. Because it's a ratio of the other two trig functions, tangent is undefined wherever cosine is zero — at 90° and 270° — and it repeats with a period of 180°, unlike sine and cosine which repeat every 360°. This calculator also returns the cotangent, its reciprocal (adjacent over opposite), for the same angle.

Enter an angle in either degrees or radians and it computes both values instantly, sparing you the unit conversion and lookup-table work by hand. Students working through trigonometry homework, engineers computing slopes and grades, surveyors calculating elevation angles, and physicists resolving vector components reach for tangent constantly — it's the function that directly relates an angle to a rise-over-run slope, which is why it shows up in everything from roof pitch calculations to projectile motion problems.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    Tangent is rise divided by run, so it converts straight into roof pitch or a ramp. Entering 18.43 degrees gives 0.333237, close to a pitch of 4 in 12. Notice how steeply values climb near 90 degrees: 89 degrees is already about 57.29, which is why slope estimates from very steep angles are so sensitive to small measurement errors. Which job are you using tangent for, a slope, a roof or a survey angle?

Popular calculators

All Calculators