My Calculator

Tan Calculator

Calculate tan(θ) from any angle, find the angle from a tangent ratio or right-triangle sides, with a visual diagram and full step-by-step solution.

tan(θ)1.000000
Angle (degrees)45.00°
Angle (radians)0.7854 rad
sin(θ)0.707107
cos(θ)0.707107
Quadrant1

Unit Circle — Tangent Line Diagram

tangent line (x = 1)tan θ = 1.000θxy

Step-by-Step Solution

Here's exactly how this answer was calculated, one step at a time.

  1. 1

    Convert the angle to radians

    θ = 45 deg = 0.7854 rad

    The angle is first converted to radians using θ(rad) = θ(deg) × π / 180.

  2. 2

    Find sin(θ) and cos(θ) from the unit circle

    sin(θ) = 0.7071, cos(θ) = 0.7071

    These are the y- and x-coordinates of the point where the angle's ray meets the unit circle — the same values used by the sin and cos calculators.

  3. 3

    Divide sine by cosine

    tan(θ) = sin(θ) / cos(θ) = 0.7071 / 0.7071 = 1.000000

    Tangent is defined as the ratio of sine to cosine. Geometrically, it's also the y-value where the extended angle ray crosses the vertical tangent line touching the circle at (1, 0) — shown in the diagram above.

  4. 4

    Identify the quadrant and reference angle

    Quadrant 1, reference angle = 45.00°

    tan(θ) is positive in quadrants 1 and 3 (where sine and cosine share the same sign) and negative in quadrants 2 and 4.

tan(45.00°) = 1.000000

Free Online Tan Calculator — Solve tan(θ) Instantly

This tan calculator (tangent calculator) is a complete trigonometry tool that solves tangent problems in every direction you're likely to face — plug in an angle to get tan(θ), plug in the opposite and adjacent sides of a right triangle to get the angle, or plug in a decimal tangent value to solve an equation like tan(θ) = 1 for θ. Every calculation is backed by a labeled diagram and a full step-by-step solution, so you can see exactly how the tangent value or angle was derived instead of just getting a bare number.

Whether you're a student solving trigonometry homework, checking a physics or engineering problem involving slopes and angles, or just need a quick sine, cosine, and tangent value for an angle in degrees or radians, this calculator covers the full sin, cos, tan relationship in one place.

What Is Tangent (tan) in Trigonometry?

Tangent is one of the three primary trigonometric ratios, alongside sine and cosine. For any angle θ measured in a right triangle, tangent is defined as the ratio of the length of the side opposite the angle to the length of the side adjacent to it — notably, unlike sine and cosine, the hypotenuse doesn't appear in this ratio at all. This ratio, written tan(θ) = Opposite ÷ Adjacent, is the third piece of the SOH-CAH-TOA mnemonic taught in every trigonometry class:

  • SOH — Sine = Opposite ÷ Hypotenuse
  • CAH — Cosine = Adjacent ÷ Hypotenuse
  • TOA — Tangent = Opposite ÷ Adjacent

The Tangent Formula and the Unit Circle

Tangent can also be written as the ratio of sine to cosine: tan(θ) = sin(θ) ÷ cos(θ). Geometrically, this has a beautiful interpretation on the unit circle — the one shown in the diagram above. Draw a vertical line touching the circle at the point (1, 0); this is called the tangent line, and it's literally where the name 'tangent' comes from. Extend the ray from the center through the angle θ until it crosses this tangent line — the y-coordinate of that crossing point is exactly tan(θ). This is exactly what the red dashed line and red dot in the diagram represent.

  • tan(θ) = Opposite ÷ Adjacent (right-triangle definition)
  • tan(θ) = sin(θ) ÷ cos(θ) (ratio identity)
  • tan(θ) = y-value where the extended angle ray crosses the vertical tangent line at x = 1
  • θ = tan⁻¹(x) — the inverse tangent (arctan) function, used to solve for the angle when the ratio is known
  • Unlike sine and cosine, tan(θ) has no upper or lower bound — it can be any real number

How to Use This Tan Calculator — Step by Step

Pick the mode that matches your problem, enter your numbers, and read the result along with the diagram and worked solution below it.

  • tan(θ) from an angle: type an angle and choose degrees, radians, or gradians — the calculator instantly returns tan(θ), sin(θ), cos(θ), the quadrant, and the reference angle, plotted on the tangent-line unit circle diagram.
  • θ from right-triangle sides: enter the opposite and adjacent sides of a right triangle — the calculator applies tan(θ) = Opposite ÷ Adjacent, then uses the inverse tangent to solve for θ, and draws the triangle to scale with every side labeled.
  • θ from a tangent value: enter any real number to solve equations like tan(θ) = 1 for θ, returning the principal angle plus the next solution 180° further round.

Worked Example — Solving tan(45°)

Suppose you need tan(45°). Switch to the first mode, enter 45, choose degrees, and the calculator converts 45° to π/4 radians, finds sin(45°) = cos(45°) = √2/2, and divides them: tan(45°) = (√2/2) ÷ (√2/2) = 1 exactly. In the diagram, the extended ray crosses the tangent line exactly at y = 1, matching this well-known result.

Now suppose you're given a right triangle with an opposite side of 3 and an adjacent side of 4 — a classic 3-4-5 triangle. Switching to the second mode and entering those values gives tan(θ) = 3 ÷ 4 = 0.75, and applying the inverse tangent, θ = tan⁻¹(0.75) ≈ 36.87°. The calculator also finds the hypotenuse using the Pythagorean theorem: √(3² + 4²) = 5, completing the full 3-4-5 right triangle.

Common Tangent Values Table

These standard angles come up constantly in trigonometry, and it helps to recognize them at a glance rather than recalculating them each time:

  • tan(0°) = 0
  • tan(30°) = 1/√3 ≈ 0.577
  • tan(45°) = 1
  • tan(60°) = √3 ≈ 1.732
  • tan(90°) = undefined
  • tan(180°) = 0
  • tan(270°) = undefined
  • tan(360°) = 0

Why Is tan(90°) Undefined?

Since tan(θ) = sin(θ) ÷ cos(θ), tangent becomes undefined whenever cos(θ) = 0 — which happens at 90°, 270°, and every odd multiple of 90° after that. Geometrically, at exactly 90° the angle's ray points straight up, running parallel to the tangent line rather than crossing it, so there's no intersection point and no finite tangent value. On a graph of tan(θ), these points appear as vertical asymptotes, where the curve rockets toward positive or negative infinity. This calculator detects these angles automatically and reports 'undefined' instead of a misleading number.

Understanding the Sign of tan(θ) by Quadrant

Because tan(θ) = sin(θ) ÷ cos(θ), its sign depends on whether sine and cosine share the same sign in a given quadrant. This calculator automatically detects and displays the quadrant for any angle you enter:

  • Quadrant 1 (0°-90°): both sin and cos are positive, so tan(θ) is positive
  • Quadrant 2 (90°-180°): sin is positive, cos is negative, so tan(θ) is negative
  • Quadrant 3 (180°-270°): both sin and cos are negative, so tan(θ) is positive again
  • Quadrant 4 (270°-360°): sin is negative, cos is positive, so tan(θ) is negative

Degrees vs Radians vs Gradians

Angles can be measured in more than one unit, and this calculator supports the three most common ones. Degrees split a full circle into 360 equal parts and are the most familiar unit in everyday geometry. Radians measure angle by arc length relative to the radius, making a full circle equal to 2π radians — this is the unit calculus and most programming languages use internally. Gradians (or gons) split a full circle into 400 parts and appear mostly in surveying and some European engineering contexts. Whichever unit your problem uses, simply select it from the dropdown and the calculator handles the conversion automatically.

Where Tangent Calculations Are Used in Real Life

Tangent isn't just a classroom exercise — it shows up anywhere slopes, elevations, or rates of change matter:

  • Construction and roofing: expressing roof pitch and ramp gradients as a rise-over-run ratio, which is exactly what tangent represents.
  • Surveying and land measurement: finding the height of a building or tree from a measured distance and an angle of elevation.
  • Physics: calculating the slope of an inclined plane, and analyzing projectile motion angles.
  • Navigation: computing bearings and headings from north-south and east-west distance components.
  • Computer graphics: tangent is used to calculate field-of-view and perspective projections in 3D rendering.

Tips for Getting Accurate Results

Always double-check which angle unit your problem is stated in before entering a value — a common mistake is entering a radian value while the unit dropdown is still set to degrees, which will give a wildly different (and wrong) answer. When solving for an angle from a tangent value or triangle sides, remember that inverse tangent only returns one principal solution between -90° and 90°; since tangent repeats every 180° (not 360° like sine and cosine), always check whether your problem expects a second solution 180° further around the circle.

Frequently Asked Questions

What is the formula for tan(θ)?

In a right triangle, tan(θ) = Opposite side ÷ Adjacent side. It can also be written as tan(θ) = sin(θ) ÷ cos(θ), and geometrically it's the y-value where the extended angle ray crosses the tangent line touching the unit circle at (1, 0).

Why is tan(90°) undefined?

Because tan(θ) = sin(θ) ÷ cos(θ), and cos(90°) = 0. Dividing by zero is undefined, so tangent has no value at 90°, 270°, and every odd multiple of 90°. These appear as vertical asymptotes on the tangent graph.

What is the range of tan(θ)?

Unlike sine and cosine, which are limited to values between -1 and 1, tangent can be any real number from negative infinity to positive infinity.

How do I find the angle if I know tan(θ)?

Use the inverse tangent function, written tan⁻¹(x) or arctan(x). This calculator's third mode does exactly that — enter any real number and it returns the principal angle, plus the next solution 180° further around.

How often does tan(θ) repeat?

Tangent has a period of 180°, meaning tan(θ) = tan(θ + 180°) for any angle θ. This is different from sine and cosine, which repeat every 360°.

What's the difference between tan(θ) and tan⁻¹(θ)?

tan(θ) takes an angle and returns a ratio that can be any real number. tan⁻¹(x), the inverse tangent, does the opposite — it takes a ratio and returns the angle (between -90° and 90°) that produces it.

Do I need the hypotenuse to calculate tan(θ)?

No. Tangent is the only one of the three primary trig ratios that doesn't use the hypotenuse — it only needs the opposite and adjacent sides, since tan(θ) = Opposite ÷ Adjacent.