acalculator

What is the tangent of my angle?

Type an angle in degrees or radians. The tangent calculator shows tan θ, its exact value when the angle is a multiple of 15°, cot θ, the reference angle and the quadrant.

Your numbers

Units
tan θ
0.57735

tan(30°) = 0.57735.

Exact value
tan 30° = √3/3
cot θ
1.732051
Reference angle
30°
Quadrant
Quadrant I

tan θ: 0.57735. tan(30°) = 0.57735.

How to calculate

Finds tan θ of any angle in degrees or radians, with the exact value at multiples of 15°, cot θ, and the reference angle.

Example with the default inputs (Angle θ 30 °): tan(30°) = 0.57735.

Method: tan θ = sin θ ÷ cos θ, the slope of the line from the origin at angle θ. At a multiple of 15° the exact value comes from the special angles and the quadrant sign; otherwise tan θ is computed in 64-bit floating point. cot θ = 1 ÷ tan θ.

  • The angle can be typed in degrees or radians, from −1,000,000 to 1,000,000 radians, and can be negative or more than 360°.
  • An angle within one part in 10¹² of a multiple of 15° counts as that multiple, so tan 180° is exactly 0 and tan 90° is undefined.
  • tan θ has no answer at 90° + k × 180° (cos θ = 0). cot θ shows nothing where tan θ = 0 (0°, 180°, …).

Machine-readable copies: Markdown, JSON.

Worked examples

Each example is checked against the calculator on every build.

  1. Angle θ 30° gives tan θ 0.57735, Exact value tan 30° = √3/3, cot θ 1.732051, Quadrant Quadrant I.Source: OpenStax, Algebra and Trigonometry 2e, §7.4 The Other Trigonometric Functions (tan θ = sin θ ÷ cos θ; tan π/6 = √3/3). https://openstax.org/books/algebra-and-trigonometry-2e/pages/7-4-the-other-trigonometric-functions
  2. Angle θ 45° gives tan θ 1, Exact value tan 45° = 1, cot θ 1.Source: OpenStax, Algebra and Trigonometry 2e, §7.4 The Other Trigonometric Functions (tan θ = sin θ ÷ cos θ; tan π/6 = √3/3). https://openstax.org/books/algebra-and-trigonometry-2e/pages/7-4-the-other-trigonometric-functions
  3. Angle θ 120° gives tan θ -1.732051, Exact value tan 120° = -√3, Quadrant Quadrant II, Reference angle 60°.Source: OpenStax, Algebra and Trigonometry 2e, §7.4 The Other Trigonometric Functions (tan θ = sin θ ÷ cos θ; tan π/6 = √3/3). https://openstax.org/books/algebra-and-trigonometry-2e/pages/7-4-the-other-trigonometric-functions
  4. Angle θ 57.3° gives tan θ 1.557408, cot θ 0.642093.Source: NIST DLMF §4.14 (tangent of a real angle), https://dlmf.nist.gov/4.14
  5. Angle θ 200° gives tan θ 0.36397, Quadrant Quadrant III.Source: NIST DLMF §4.14, https://dlmf.nist.gov/4.14

How it works

Draw the angle θ from the positive x-axis, turning counterclockwise for a positive angle. It meets the unit circle at the point (cos θ, sin θ). The tangent is y ÷ x:

  • tan θ = sin θ ÷ cos θ, and in a right triangle, tan θ = opposite ÷ adjacent.
  • cot θ = 1 ÷ tan θ, undefined where tan θ = 0.
  • No answer where cos θ = 0: at 90° + k × 180° (π/2 + kπ) for any whole number k. The page says so instead of showing a number.
  • Reference angle: the acute angle between θ and the x-axis, from 0° to 90°.
  • Quadrant: I (0° to 90°), II (90° to 180°), III (180° to 270°) or IV (270° to 360°), after whole turns are taken off. An angle that ends on an axis shows the axis instead.

Exact values. When θ is a multiple of 15° (π/12 radians), the calculator shows the exact value. It takes the reference angle's tangent from this table and gives it the sign of the quadrant (positive in I and III, negative in II and IV):

Reference angle0°15°30°45°60°75°90°
tan02 − √3√3/31√32 + √3undefined

An angle within one part in 10¹² (relative, and at least 10⁻¹² radians) of a multiple of 15° counts as that multiple. So tan 180° is exactly 0 and tan 90° is undefined, not the 1.6 × 10¹⁶ that a rounded π/2 gives. For any other angle, tan θ is computed in 64-bit floating point.

Output format. tan θ and cot θ show as decimal numbers. The exact value shows as text, such as tan 30° = √3/3 (- for a negative value; a negated sum is written in brackets, -(2 + √3)). The reference angle shows in degrees.

Assumptions

  • The angle is typed in degrees or radians, from −1,000,000 to 1,000,000 radians. Negative angles turn clockwise.
  • cot θ shows nothing at 0°, 180° and the other angles where tan θ = 0.

Worked examples by hand

θ = 30°. tan 30° = (1/2) ÷ (√3/2) = 1/√3 = √3/3 ≈ 0.5773502691896257; cot 30° = √3 ≈ 1.7320508075688772.

θ = 45°. tan 45° = (√2/2) ÷ (√2/2) = 1, and cot 45° = 1.

θ = 120°. 180° − 120° = 60°, so the reference angle is 60° and the angle is in quadrant II, where the tangent is negative: tan 120° = −√3 ≈ −1.7320508075688772.

θ = 1 radian. tan 1 ≈ 1.557407724654902, and cot 1 ≈ 0.6420926159343308.

θ = 200°. 200° is in quadrant III (reference angle 20°), where sine and cosine are both negative, so tan 200° ≈ 0.3639702342662023.

θ = 90°. cos 90° = 0, so tan 90° has no answer.

Other questions people ask

What is the tangent of an angle?

tan θ = sin θ ÷ cos θ. On the unit circle it is y ÷ x for the point at angle θ, the slope of the line from the origin. In a right triangle with acute angle θ, tan θ = opposite side ÷ adjacent side.

What is tan 45°?

tan 45° = 1 exactly, because sin 45° and cos 45° are both √2/2. Also tan 30° = √3/3 ≈ 0.5774 and tan 60° = √3 ≈ 1.7321.

Why is tan 90° undefined?

At 90° the point on the unit circle is (0, 1), so tan 90° = 1 ÷ 0, which has no value. The same happens at 270° and at every 90° + k × 180°. The calculator gives no answer there and says why.

Should I use degrees or radians?

Use the unit the angle is given in. A full turn is 360° or 2π radians. Typing 45 with the unit set to radians gives tan 45 rad ≈ 1.6198, not 1.

When is tangent negative?

tan θ is negative when sine and cosine have opposite signs: in quadrants II (90° to 180°) and IV (270° to 360°). tan 120° = −√3.

What is cot θ?

The cotangent, cot θ = 1 ÷ tan θ = cos θ ÷ sin θ. It is 0 where tan θ is undefined, and undefined where tan θ = 0 (0°, 180°), so the calculator leaves it empty there.