Math calculators

Tangent Calculator

Updated Sep 17, 2026 By Infinity Calculator
Rate Formulas

Tangent Calculator

Type any angle, pick degrees or radians, then press Calculate (or Enter). The π button inserts 3.14159265358979 and switches the unit to radians.
Quick-select common angles (degrees)
Result
tan(45°) = 1
    Step-by-Step Solution
    Graph of tan(θ) around your angle

    Expression-Based Tangent Calculator

    Supported: tan, sin, cos, atan, sqrt, abs · operators + - * / ^ ( ) · constants pi, π, e · inline units deg, °, rad, grad. An angle with no unit uses the default unit selected beside this field.
    Expression Result
    2*tan(45°)+1 = 3
    Expression Breakdown

    Tangent Reference Table

    Tangent values for standard angles from −90° to 90°. The highlighted row matches the angle currently entered above (tangent repeats every 180°).
    Angle (Degrees) Angle (Radians) tan(x) Decimal

    Introduction

    This tangent calculator finds tan(θ) for any angle you type. Pick degrees or radians, press Calculate, and the answer appears. It also shows sin θ, cos θ, cot θ, the quadrant, and the closest asymptote.

    Tangent is one of the three main trig ratios. In a right triangle, tan(θ) is the opposite side divided by the adjacent side. You can also write it as sin θ ÷ cos θ. When cos θ is 0, like at 90°, tangent has no value. The tool marks those spots as undefined.

    Every answer comes with the steps behind it. You can see the angle change to radians, the cosine check, and the final math. A graph draws the tangent curve around your angle and dots your point, so the shape and the asymptotes are easy to spot.

    The second box handles full math expressions like 2*tan(45deg)+1 or tan(30deg)*tan(60deg). It reads sin, cos, atan, sqrt, abs, pi, and e, and it breaks the work into steps. Below that, a reference table lists tangent values for common angles from −90° to 90°, with the matching row highlighted.

    Use it for homework, geometry, slope problems, physics, and engineering work. It is free, fast, and needs no sign-up.

    How to use our Tangent Calculator

    Type an angle, pick degrees or radians, and the tangent calculator shows tan(θ) with step-by-step math, a facts list, a graph, and a reference table.

    Angle value: Type the angle you want, like 45 or 1.25. It can be positive, negative, or a decimal.

    Angle unit: Choose Degrees (°) or Radians (rad) so the calculator reads your number the right way.

    Insert π button: Click it to drop 3.14159265358979 into the angle box and switch the unit to radians.

    Quick-select buttons: Tap 0°, 30°, 45°, 60°, 90°, or 180° to fill in a common angle fast.

    Calculate and Reset: Press Calculate (or hit Enter) to get your answer. Press Reset to go back to 45°.

    Copy button: Click the copy icon to save the tangent result to your clipboard.

    Expression box: In the second tool, type a math problem that uses tan, like 2*tan(45deg)+1. You can also use sin, cos, atan, sqrt, abs, the signs + - * / ^ ( ), and pi or e.

    Default unit for un-suffixed angles: Pick Degrees, Radians, or Gradians. This unit is used for any angle in your expression that has no unit written after it.

    Expression Calculate and Clear: Press Calculate to see the answer and the breakdown. Press Clear to empty the box and start over.

    What Is the Tangent?

    The tangent, written as tan, is one of the three main trig functions, along with sine and cosine. In a right triangle, the tangent of an angle is the length of the opposite side divided by the length of the adjacent side.

    tan(θ) = opposite ÷ adjacent

    You can also find it from sine and cosine:

    tan(θ) = sin(θ) ÷ cos(θ)

    Degrees and Radians

    Angles can be measured two ways. Degrees split a full circle into 360 parts. Radians split it into 2π parts. To switch between them:

    • Degrees to radians: multiply by π/180
    • Radians to degrees: multiply by 180/π

    So 45° is the same as π/4 radians. Both give the same tangent value.

    When Tangent Is Undefined

    Because tangent divides by cosine, it breaks when cosine equals zero. That happens at 90°, 270°, −90°, and every 180° after that. At those angles tan(θ) has no answer. On a graph, the curve shoots straight up or down near these spots. These lines are called vertical asymptotes.

    Common Tangent Values

    • tan(0°) = 0
    • tan(30°) = √3/3 ≈ 0.5774
    • tan(45°) = 1
    • tan(60°) = √3 ≈ 1.7321
    • tan(90°) = undefined
    • tan(180°) = 0

    Key Facts About tan(θ)

    • It repeats every 180° (π radians). So tan(30°) equals tan(210°).
    • It is an odd function. tan(−θ) = −tan(θ).
    • It is positive in quadrants I and III, and negative in quadrants II and IV.
    • Its range has no limit. Unlike sine and cosine, tangent can be any real number.
    • Its flip is cotangent: cot(θ) = 1 ÷ tan(θ).

    Where Tangent Is Used

    Tangent shows up whenever you work with slopes and angles. Builders use it to find roof pitch and ramp angles. Surveyors use it to measure the height of a tall tree or building from a distance. Engineers and game makers use it to aim objects and set camera angles. In math class, it also helps you find a missing side of a right triangle when you know one angle and one side.

    The Inverse: Arctangent

    If you know the ratio and want the angle, you use the inverse tangent, written as arctan or tan⁻¹. For example, arctan(1) = 45°, because tan(45°) = 1.


    Formulas used

    Tangent as sine over cosine
    \tan\theta = \frac{\sin\theta}{\cos\theta}
    Degrees to radians conversion
    \theta_{\mathrm{rad}} = \theta_{\mathrm{deg}} \times \frac{\pi}{180}
    Radians to degrees conversion
    \theta_{\mathrm{deg}} = \theta_{\mathrm{rad}} \times \frac{180}{\pi}
    Gradians to radians conversion
    \theta_{\mathrm{rad}} = \theta_{\mathrm{grad}} \times \frac{\pi}{200}
    Undefined values (vertical asymptotes)
    \tan\theta \text{ is undefined when } \cos\theta = 0,\ \text{i.e. } \theta = \frac{\pi}{2} + k\pi = 90^\circ + 180^\circ k,\ k \in \mathbb{Z}
    Cotangent as reciprocal of tangent
    \cot\theta = \frac{1}{\tan\theta}
    Period identity of tangent
    \tan\theta = \tan(\theta + \pi) = \tan(\theta + 180^\circ)
    Inverse tangent (arctan) returned in the selected unit
    \arctan(x) = \theta \quad \text{with} \quad \theta_{\mathrm{deg}} = \arctan(x) \times \frac{180}{\pi}

    Frequently asked questions

    What does the TOA in SOHCAHTOA mean?

    TOA is the memory trick for tangent. It stands for Tangent = Opposite over Adjacent.

    So in a right triangle:

    tan(angle) = opposite side ÷ adjacent side

    The opposite side is across from the angle. The adjacent side is next to the angle and is not the hypotenuse.

    How do you find a missing side of a right triangle using tangent?

    Rearrange the tangent formula:

    • Missing opposite side: opposite = adjacent × tan(angle)
    • Missing adjacent side: adjacent = opposite ÷ tan(angle)

    Example: the angle is 35° and the adjacent side is 10. Then opposite = 10 × tan(35°) = 10 × 0.7002 = 7.00.

    Is the tangent of an angle the same as the slope of a line?

    Yes. The slope of a straight line equals the tangent of the angle it makes with the horizontal.

    slope = rise ÷ run = tan(angle)

    A line at 45° has a slope of 1, because tan(45°) = 1. A line at 60° has a slope of about 1.73. To go the other way, use arctan: a slope of 0.5 means an angle of arctan(0.5) = 26.57°.

    How do you find the height of a tree or building using tangent?

    Stand a known distance away and measure the angle up to the top. Then:

    height = distance × tan(angle) + your eye height

    Example: you stand 30 m away, look up at 40°, and your eyes are 1.6 m off the ground.

    height = 30 × tan(40°) + 1.6 = 30 × 0.8391 + 1.6 = 26.8 m

    How do you turn a roof pitch into an angle?

    Roof pitch is written as rise over run, like 6/12. That ratio is the tangent of the roof angle, so use inverse tangent:

    angle = arctan(rise ÷ run)

    For a 6/12 pitch: arctan(6 ÷ 12) = arctan(0.5) = 26.57°. A 12/12 pitch gives arctan(1) = 45°.

    Why is tan(45°) exactly 1?

    A 45° angle sits in a 45-45-90 triangle. That triangle has two equal legs, so the opposite side and the adjacent side are the same length.

    tan(45°) = opposite ÷ adjacent = 1 ÷ 1 = 1

    It also works with sine and cosine: sin(45°) and cos(45°) both equal √2/2, and one divided by the other is 1.

    Why does tan(45) sometimes give 1.6197 instead of 1?

    The device is set to radian mode. It reads 45 as 45 radians, not 45 degrees, and tan(45 rad) ≈ 1.6197.

    Switch the angle unit to degrees, or type the angle in radians instead. In radians, 45° is π/4 ≈ 0.7854, and tan(0.7854) = 1.

    What is the exact value of tan(15°)?

    tan(15°) = 2 − √3 ≈ 0.2679

    You get it from the subtraction formula, since 15° = 45° − 30°:

    tan(45° − 30°) = (1 − √3/3) ÷ (1 + √3/3) = 2 − √3

    In the same way, tan(75°) = 2 + √3 ≈ 3.7321.

    How do you solve tan(x) = 1?

    One answer is x = 45°. But tangent repeats every 180°, so there are endless answers.

    x = 45° + 180n, where n is any whole number (…, −135°, 45°, 225°, 405°, …).

    In radians: x = π/4 + πn. For any equation tan(x) = k, the rule is x = arctan(k) + 180n.

    What is the tangent addition formula?

    To add or subtract two angles:

    tan(A + B) = (tan A + tan B) ÷ (1 − tan A × tan B)

    tan(A − B) = (tan A − tan B) ÷ (1 + tan A × tan B)

    For a doubled angle:

    tan(2A) = 2 tan A ÷ (1 − tan²A)

    Why is the tangent function called tangent?

    Tangent comes from a Latin word that means "to touch." Draw a circle with radius 1 and a straight line that just touches it at the point (1, 0). That touching line is a tangent line.

    When you draw a ray from the center at some angle, it crosses that line. The height of the crossing point is the tangent of the angle. That is where the name and the value come from.

    What is a gradian, and what is tan(50 grad)?

    A gradian (also called a gon or grad) is another way to measure angles. A full circle is 400 gradians, so a right angle is 100 grad and 1 grad = 0.9°.

    That means 50 grad = 45°, so tan(50 grad) = 1. Tangent is undefined at 100 grad, just as it is at 90°. Surveyors are the main users of gradians.