What is the Tangent Angle Calculator?
This tool finds the angle θ of a right triangle when you know the lengths of the side opposite the angle and the side adjacent to it. It is based on the fundamental trigonometric relationship that the tangent of an angle equals the ratio of the opposite side to the adjacent side. By taking the inverse tangent (arctangent), the calculator returns θ in both degrees and radians.
How to use it
Enter the length of the opposite side (the leg across from the angle) and the adjacent side (the leg next to the angle, not the hypotenuse). Click calculate and you'll get the angle along with the raw tangent ratio. Any consistent units work — only the ratio matters, so meters, feet, or pixels all give the same angle.
The formula explained
In a right triangle, \(\tan(\theta) = \frac{\text{opposite}}{\text{adjacent}}\). To solve for the angle itself you apply the arctangent function: $$\theta = \arctan\!\left(\frac{\text{Opposite}}{\text{Adjacent}}\right)$$ This calculator uses a two-argument arctangent (atan2) internally so it handles edge cases like a zero adjacent side gracefully, returning 90° rather than dividing by zero.
Worked example
Suppose the opposite side is 1 and the adjacent side is 1. Then \(\tan(\theta) = \frac{1}{1} = 1\), and \(\theta = \arctan(1) = 45°\). If the opposite side were \(\sqrt{3}\) and the adjacent side 1, \(\tan(\theta) = 1.732\), giving \(\theta = 60°\).
Common Tangent Values and Angles
The tangent of an acute angle in a right triangle is the ratio of the opposite side to the adjacent side, \(\tan\theta = \frac{\text{opposite}}{\text{adjacent}}\). This calculator reverses that: \(\theta = \arctan\left(\frac{\text{opposite}}{\text{adjacent}}\right)\). The table lists standard angles and their exact tangent values.
| Angle (degrees) | Angle (radians) | Exact tan θ | Decimal |
|---|---|---|---|
| 0° | 0 | 0 | 0 |
| 15° | π/12 | 2 − √3 | ≈ 0.268 |
| 30° | π/6 | 1/√3 | ≈ 0.577 |
| 45° | π/4 | 1 | 1 |
| 60° | π/3 | √3 | ≈ 1.732 |
| 75° | 5π/12 | 2 + √3 | ≈ 3.732 |
| 90° | π/2 | undefined | no finite value |
To convert between units, use \(\text{radians} = \text{degrees} \times \frac{\pi}{180}\).
Real-World Slope and Angle Scenarios
Slopes are often written as rise:run, which is opposite:adjacent. The percent grade equals \(\tan\theta \times 100\). Values are rounded.
| Rise : Run | Ratio (opposite/adjacent) | θ (degrees) | θ (radians) | Percent grade |
|---|---|---|---|---|
| 1 : 12 (typical accessibility-ramp slope) | 0.0833 | 4.76° | 0.0831 | 8.33% |
| 1 : 2 | 0.5 | 26.57° | 0.4636 | 50% |
| 1 : 1 | 1 | 45° | 0.7854 | 100% |
| 2 : 1 | 2 | 63.43° | 1.1071 | 200% |
| 5 : 1 | 5 | 78.69° | 1.3734 | 500% |
Worked example for the 1:12 ramp: \(\theta = \arctan\left(\frac{1}{12}\right) = \arctan(0.08333) \approx 0.0831\text{ rad} \approx 4.76^\circ\). The grade is \(\frac{1}{12} \times 100 \approx 8.33\%\). Note that a 100% grade is 45°, not 90°; grade grows without limit as a slope approaches vertical.
Interpreting Your Result
- Range: for positive side lengths, θ lies strictly between 0° and 90° (0 to π/2 radians).
- Ratio below 1: if the opposite side is shorter than the adjacent side, θ is less than 45°.
- Ratio equal to 1: the two legs are equal and θ = 45° (π/4 rad).
- Ratio above 1: if the opposite side is longer than the adjacent side, θ is greater than 45°.
- Approaching 90°: tan θ grows without bound as θ nears 90°, so very large ratios give angles very close to 90° without reaching it. For example, a ratio of 5 gives about 78.69°.
- Complementary angle: the other acute angle of the right triangle is \(90^\circ - \theta\) (or \(\frac{\pi}{2} - \theta\) in radians). For θ ≈ 26.57°, the other angle is about 63.43°, and its tangent is the reciprocal ratio (2 instead of 0.5).
- Domain note: the arctan function alone returns values in the open interval (−90°, 90°), so a negative ratio would give a negative angle. This calculator is intended for the legs of a right triangle, which are positive lengths. For directions in all four quadrants (such as coordinates), a two-argument arctangent (atan2) is the appropriate tool.
Remember that the angle depends only on the ratio of the sides, so a triangle with legs 3 and 4 has the same angle as one with legs 30 and 40 provided the units are the same for both legs.
FAQ
Which side is opposite and which is adjacent? The opposite side faces the angle θ; the adjacent side touches θ and the right angle. The hypotenuse is never used in this calculation.
Why is my answer in degrees and radians? Degrees are common in everyday geometry, while radians are standard in calculus and physics — both describe the same angle.
What if the adjacent side is 0? The angle is 90° (a vertical line), which the calculator reports without error.