What is tangent?
Tangent is a ratio from a right triangle. Pick one of the acute angles, look at the side opposite it and the side next to it, and divide the opposite by the adjacent. That ratio is the tangent of the angle. Unlike sine and cosine, the tangent has no upper limit — it runs from minus infinity to plus infinity.
The tangent of 45 degrees is exactly 1. At 45 degrees the opposite and adjacent sides are equal, so their ratio is 1. The tangent of 30 degrees is 0.58, and the tangent of 60 degrees is 1.73. The steeper the angle, the bigger the tangent — and as the angle approaches 90 degrees, the tangent grows without bound.
This calculator takes an angle in degrees or radians and returns the tangent, the sine, and the cosine together. The three are shown as a set because the tangent is defined through the other two — tan(θ) = sin(θ) ÷ cos(θ) — and showing all three lets you check the work. Everything runs in your browser, so nothing is uploaded or stored.
How tangent is calculated from an angle
In a right triangle, tan(θ) = opposite ÷ adjacent. For a 3-4-5 triangle, the angle opposite the side of 3 has tangent 3 ÷ 4, which is 0.75. The angle opposite the side of 4 has tangent 4 ÷ 3, which is 1.33. The two tangents are reciprocals of each other, because the two acute angles are complementary — what is opposite for one is adjacent for the other.
The tangent can also be found from sine and cosine: tan(θ) = sin(θ) ÷ cos(θ). For 45 degrees, sin is 0.71 and cos is 0.71, so tan is 0.71 ÷ 0.71, which is 1. That division is also the reason the tangent fails at 90 degrees: cos 90° is 0, and dividing by zero is undefined, so tan 90° does not exist.
When the angle is given in degrees, it is first converted to radians: radians = degrees × π ÷ 180. So 45 degrees becomes 0.7854 radians. If you type the angle in radians already, no conversion happens. A scientific calculator gives the same tangent for a single angle if you want to cross-check.
Degrees or radians: pick the right unit
Degrees and radians are two ways of measuring the same angle, and mixing them up is the most common tangent mistake there is. 45 degrees is 0.7854 radians. Type 45 with the unit set to radians and you get tan(45 radians), which is 1.62 — a completely different answer for what looks like the same input.
Degrees are what people use in everyday life: a 90-degree corner, a 45-degree cut, a 30-degree roof slope. Radians are what mathematics and programming use, because they make the formulas simpler: a full circle is 2π radians, a half circle is π, and a right angle is π ÷ 2, which is about 1.5708.
The rule is simple: match the unit to the number you have. If your angle came from a protractor or a drawing, it is in degrees. If it came from a formula or a piece of code, it is probably in radians. The unit selector sits right under the angle box, so check it every time — it is the one setting that can silently turn a right answer wrong. A triangle calculator works in degrees throughout, if that is the unit you are thinking in.
A worked example: tan 45°
Type 45 with the unit set to degrees. The calculator converts 45 degrees to 0.7854 radians and returns tan 1, sin 0.71, and cos 0.71. The tangent is exact: at 45 degrees the opposite and adjacent sides are equal, so their ratio is 1 with no rounding involved.
The sine and cosine are each 0.71, which is 1 ÷ √2, or about 0.7071. Check the tangent from them: 0.7071 ÷ 0.7071 is 1, as it must be. And check the identity: 0.7071² + 0.7071² is 0.5 + 0.5, which is 1. Every value on the page comes from the same angle, so they must agree with each other — and they do.
Now try 30 degrees. Tan 30° is 0.58, sin 30° is 0.5, and cos 30° is 0.87. From the ratios: 0.5 ÷ 0.87 is 0.58. And at 90 degrees, tan is undefined — the calculator shows a dash — because cos 90° is 0. Near 90 degrees the tangent is huge: tan 89° is 57.29, which shows how fast it blows up.
Where tangent is used
Tangent is the gradient function. The slope of a line is the tangent of the angle it makes with the horizontal: a line at 45 degrees has slope 1, a line at 30 degrees has slope 0.58, and a vertical line has undefined slope, just as tan 90° is undefined. Roof pitches, road gradients, and ramps are all tangents in disguise, and a slope calculator works the same triangle from the rise and run instead of the angle.
In surveying, tangent turns an angle and a distance into a height. Stand 10 metres from a tree, measure the angle to the top as 30 degrees, and the height is 10 × tan 30°, which is 5.77 metres. The same method sizes buildings, hills, and towers from the ground, with no need to climb anything.
Road builders use tangent for gradients, usually quoted as a percentage. A 10 percent gradient means the road rises 10 units for every 100 it runs, which is a tangent of 0.10 and an angle of about 5.71 degrees. A 100 percent gradient is a 45-degree slope, because tan 45° is 1. Reading a gradient sign as a tangent keeps the numbers honest: a 20 percent hill sounds gentle, but it is an 11.31-degree climb, steep enough to make a loaded truck work hard.
In navigation and astronomy, tangent converts angles into distances on the ground or in the sky. In graphics, it sets the field of view: the height of the visible scene at a given distance is distance × tan(half the view angle). Every 3D game uses that formula to decide what fits on the screen.
Tangent vs sine and cosine
Tangent, sine, and cosine are three views of the same triangle. Tangent is opposite over adjacent, sine is opposite over hypotenuse, and cosine is adjacent over hypotenuse — and tangent is sine divided by cosine. For 45 degrees, tangent is 1, sine is 0.71, and cosine is 0.71, and 0.71 ÷ 0.71 is indeed 1.
Tangent is the only one of the three that is unbounded. Sine and cosine stay between −1 and 1, but the tangent runs to infinity wherever the cosine hits zero. That makes it the right tool for slopes and gradients, where steepness genuinely has no ceiling, and the wrong tool where a bounded ratio is wanted.
The tangent also repeats twice as fast as sine and cosine: its period is 180 degrees, not 360. Tan 30° and tan 210° are both 0.58, because the ratio of opposite to adjacent is the same for angles half a circle apart. A Desmos scientific calculator plots the tangent curve if you want to see the repeating branches and the breaks at 90 and 270 degrees.
Common tangent mistakes
The first mistake is the unit: typing degrees while the calculator is set to radians, or the reverse. Tan 45 in radians is 1.62, not 1. Always check the unit selector before reading the answer. The second mistake is reading tan 90° as zero or as infinity. It is undefined — the calculator shows a dash, which is the correct answer, not a failure.
The third mistake is confusing tangent with sine or cosine when finding a height. Height from an angle and a horizontal distance uses tangent: height = distance × tan(angle). Using sine there gives the wrong side of the triangle. Sketch the triangle, label opposite and adjacent, and the right ratio becomes obvious.
The fourth mistake is forgetting that the tangent can be negative. Past 90 degrees the tangent goes negative, and past 180 it is positive again. A negative tangent is not an error — it means the angle is in the second or fourth quadrant, where the opposite and adjacent sides have opposite signs.
How to use this tangent calculator
Type the angle, then set the unit to degrees or radians to match the number you typed. The default is 45 degrees, which gives tan 1, sin 0.71, and cos 0.71. The results update live as you type, so you can sweep through angles and watch the tangent climb toward 90 degrees.
Read the tangent as the headline result. The sine and cosine sit underneath for checking: tan should equal sin ÷ cos, and sin² + cos² should be 1. If those checks fail, the unit is probably wrong.
Everything runs in your browser. No account, no sign-up, no data sent anywhere. For a slope or a gradient, the tangent is the number you want — and for the rise and run behind it, the slope calculator linked above works from the measurements instead of the angle. Keep the unit in mind, and the tangent will not mislead you.