What this calculator does
The Right Triangle Trigonometry Calculator solves a right triangle when you know the lengths of its two legs — the side opposite the angle of interest (a) and the side adjacent to it (b). From these it computes the hypotenuse, the three primary trigonometric ratios (sine, cosine and tangent), both acute angles, the area and the perimeter. This is a universal geometry/math tool, valid everywhere.
How to use it
Enter the opposite side (a) and the adjacent side (b) in any consistent unit (cm, m, inches — the result uses the same unit). Press calculate. The hypotenuse appears in the highlighted box, and the supporting table lists the trig ratios, angles in degrees, area and perimeter. Because a right triangle's acute angles always add to 90°, the calculator reports both.
The formulas explained
The hypotenuse comes from the Pythagorean theorem, $$c = \sqrt{a^{2} + b^{2}}.$$ The trig ratios are defined relative to angle \(\theta\) that sits opposite side a: \(\sin\theta = \text{opposite} \div \text{hypotenuse}\), \(\cos\theta = \text{adjacent} \div \text{hypotenuse}\), and \(\tan\theta = \text{opposite} \div \text{adjacent}\). The angle itself is $$\theta = \arctan\!\left(\frac{a}{b}\right),$$ and the area of a right triangle is $$A = \tfrac{1}{2} \times a \times b.$$
Worked example
For the classic 3-4-5 triangle, set \(a = 3\) and \(b = 4\). The hypotenuse is $$\sqrt{9 + 16} = \sqrt{25} = 5.$$ Then \(\sin\theta = \tfrac{3}{5} = 0.6\), \(\cos\theta = \tfrac{4}{5} = 0.8\), and \(\tan\theta = \tfrac{3}{4} = 0.75\). The angle \(\theta = \arctan(0.75) \approx 36.87^\circ\), so the other acute angle is \(53.13^\circ\). The area is $$\tfrac{1}{2} \times 3 \times 4 = 6$$ and the perimeter is $$3 + 4 + 5 = 12.$$
Common Right Triangle Angles and Trig Values
These exact values come from the two special right triangles and are used constantly in geometry, physics and engineering. Here \(\theta\) is an acute angle, and sin = opposite/hypotenuse, cos = adjacent/hypotenuse, tan = opposite/adjacent.
| Angle \(\theta\) | sin θ (exact) | sin θ (decimal) | cos θ (exact) | cos θ (decimal) | tan θ (exact) | tan θ (decimal) |
|---|---|---|---|---|---|---|
| 0° | 0 | 0 | 1 | 1 | 0 | 0 |
| 30° | \(\frac{1}{2}\) | 0.5000 | \(\frac{\sqrt{3}}{2}\) | 0.8660 | \(\frac{1}{\sqrt{3}}\) | 0.5774 |
| 45° | \(\frac{\sqrt{2}}{2}\) | 0.7071 | \(\frac{\sqrt{2}}{2}\) | 0.7071 | 1 | 1 |
| 60° | \(\frac{\sqrt{3}}{2}\) | 0.8660 | \(\frac{1}{2}\) | 0.5000 | \(\sqrt{3}\) | 1.7321 |
| 90° | 1 | 1 | 0 | 0 | undefined | undefined |
Note: 0° and 90° are limiting cases; a true right triangle has two acute angles strictly between 0° and 90°. tan 90° is undefined because cos 90° = 0 would make the denominator zero.
Special triangle side ratios
- 30°-60°-90° triangle: sides in the ratio \(1 : \sqrt{3} : 2\) (short leg : long leg : hypotenuse). The short leg is opposite 30°, the long leg opposite 60°.
- 45°-45°-90° triangle: sides in the ratio \(1 : 1 : \sqrt{2}\) (leg : leg : hypotenuse), because the two legs are equal.
Common Pythagorean Triples
A Pythagorean triple is a set of three positive integers satisfying \(a^2 + b^2 = c^2\), so the right triangle has whole-number sides. The table lists well-known primitive triples (no common factor) with the two acute angles, rounded to two decimals, found using \(\theta = \arctan(a/b)\).
| Triple (a-b-c) | Check \(a^2 + b^2 = c^2\) | Smaller acute angle | Larger acute angle |
|---|---|---|---|
| 3-4-5 | 9 + 16 = 25 | 36.87° | 53.13° |
| 5-12-13 | 25 + 144 = 169 | 22.62° | 67.38° |
| 8-15-17 | 64 + 225 = 289 | 28.07° | 61.93° |
| 7-24-25 | 49 + 576 = 625 | 16.26° | 73.74° |
| 20-21-29 | 400 + 441 = 841 | 43.60° | 46.40° |
| 9-40-41 | 81 + 1600 = 1681 | 12.68° | 77.32° |
Multiples of any triple, such as 6-8-10 (2 × 3-4-5) or 15-20-25 (5 × 3-4-5), produce similar triangles, so they keep exactly the same angles and the same sin, cos and tan values; only the size, area and perimeter scale.
FAQ
Which angle is \(\theta\)? \(\theta\) is the angle opposite the side you entered as "a" (the opposite leg). The calculator also shows the other acute angle.
What units should I use? Any length unit, as long as both legs use the same one. The hypotenuse, area and perimeter are returned in that unit (area is squared).
Can I enter the hypotenuse instead of a leg? This tool starts from the two legs. If you know a leg and the hypotenuse, subtract their squares and take the square root to find the missing leg first.