Tangent of an angle calculator

Type an angle in degrees. Tangent is the opposite leg over the adjacent leg. tan(45°) comes out almost 1. tan(0°) = 0. tan(30°) ≈ 0.57735.

The angle is in degrees. The calculator multiplies by π/180. At 90° the result is huge, because the computer misses π/2 by a fraction.

Input data

Results

Enter data and click Calculate.

How it works

The tangent of an acute angle in a right triangle is the opposite leg divided by the adjacent one. At 45° the legs are equal, so school writes tan(45°) = 1. The calculator calls tan after converting to radians and at 45° shows 0.9999999999999999, leftover from π.

Degrees do not go into sine or tangent on their own. First the angle times π/180. 30° is π/6 and tan(30°) ≈ 0.5773502691896257, which is 1/√3. 60° is √3 ≈ 1.7320508075688767. 0° stays 0, because the opposite side has length zero.

The field is the angle in degrees. A comma and a dot are the same decimal. A negative angle passes: tan(−45°) is the minus of the same size. 180° is almost zero again, the same horizontal direction on the circle.

At 90° school tangent does not exist, a vertical asymptote. In the browser 90 × π/180 is not exactly π/2, so you get a huge number, around 1.6×10¹⁶, not the word infinity. That is rounding, not a second formula.

Cotangent is 1/tan, on its own card. Sine and cosine take the same angle with another ratio of sides. Degrees to radians live next door, with no tangent in the box.

tan(45°) ≈ 1. tan(30°) ≈ 0.57735. tan(60°) ≈ 1.73205. tan(0°) = 0. At 89° the number already climbs hard, because you are near that vertical wall.

Formula

tan(α) = Math.tan(α° × π / 180)

How to use

  1. Type the angle in degrees, for example 45.
  2. Click Calculate. tan(45°) comes out almost 1.
  3. 30° gives about 0.57735. 0° gives 0.
  4. 90° does not print infinity, only a huge number from the π rounding.
  5. Cotangent and the degree-to-radian card live next door.

tan(45°) almost 1

Tangent is a side ratio. The calculator uses degrees and calls tan after × π/180. tan(45°) ≈ 1. tan(30°) ≈ 0.57735. 90° is a huge number.

tangent
Opposite over adjacent. School tan(45°) is 1. Here you see the leftover from π.
degrees
The calculator input. 30° gives ≈ 0.57735. 0° gives 0. The field is not radians.
π
The constant used to reach radians. 90° times π/180 misses π/2, so you get a huge number instead of infinity.

Examples

Example 1

  • 45°

0.9999999999999999

What is tan(45°)? School writes 1. The calculator keeps the leftover from π.

Example 2

  • 30°

0.5773502691896257

What is tan(30°)? About 0.57735, which is 1/√3.

Example 3

0

Is tan(0°) zero? Yes. The opposite side has length 0.

Related calculators

Common questions

What is tan(45°)?

In a notebook, 1. The result is 0.9999999999999999, because 45° times π/180 is not a perfect π/4.

What does tangent mean?

Opposite leg over adjacent leg. At 45° the two legs are equal.

What are tan(30°) and tan(60°)?

tan(30°) ≈ 0.57735, which is 1/√3. tan(60°) ≈ 1.73205, which is √3. Same triangle, swapped legs.

Does the calculator take degrees or radians?

Degrees. The calculator converts degrees to radians by multiplying by π/180. Typed 45 means 45°, not 45 radians.

What happens at 90°?

In school, tangent does not exist. Here you get a huge number, about 1.63×10¹⁶, because the computer misses π/2 by a fraction.

Does a negative angle work?

Yes. tan(−45°) is negative and the same size as tan(45°). The sign is the turn.

How is tangent different from sine?

Sine divides the opposite side by the hypotenuse. Tangent divides it by the adjacent side. Same angle, another denominator.

Where is cotangent?

On the cotangent card: 1/tan at the same angle in degrees. This page stays with tangent.

What are tan(0°) and tan(180°)?

0° gives 0. 180° is almost zero again, the same horizontal direction on the circle.

Why is π in the conversion?

The computer tangent wants radians. A degree is 1/180 of π. That is why α × π/180.

Knowledge sources

The calculator computes the same formula as the definition below.

Page updated in 2026.