Right Triangle Calculator
A free tool by DeepRit, a Google Ads agency that does PPC and nothing else. We build and run Google Ads accounts so every click is accounted for. Book a free audit call
Free right triangle calculator. Enter any two values (sides or angles) to find the missing sides, angles, area, perimeter and height, with the formulas.
Fill in any two boxes, including at least one side. Angle A is opposite side a; the right angle is opposite c.
- Sides a, b, c
- 0
- Angles A, B
- 0
- Area
- 0
- Perimeter
- 0
- Height to hypotenuse
- 0
Free, no sign-up. Runs in your browser: nothing you type is uploaded or saved.
How to use the right triangle calculator
- Fill in any two of the five boxes, including at least one side: side a, side b, the hypotenuse c, angle A or angle B.
- Leave the other boxes empty.
- Read the results. The right triangle calculator finds all three sides, both acute angles, the area, the perimeter and the height from the right angle to the hypotenuse.
Labels: sides a and b are the two legs that meet at the right angle; c is the hypotenuse (the longest side, opposite the right angle). Angle A is opposite side a, and angle B is opposite side b. A + B always equals 90°.
Right triangle formulas
Pythagorean theorem
a² + b² = c²
If the legs are 3 and 4: c = √(9 + 16) = √25 = 5. If you know the hypotenuse and one leg: b = √(c² − a²).
Our Pythagorean theorem calculator focuses on this one formula.
Trigonometric ratios (SOH CAH TOA)
For angle A:
- sin A = opposite ÷ hypotenuse = a ÷ c
- cos A = adjacent ÷ hypotenuse = b ÷ c
- tan A = opposite ÷ adjacent = a ÷ b
The mnemonic SOH CAH TOA (Sine = Opposite/Hypotenuse, Cosine = Adjacent/Hypotenuse, Tangent = Opposite/Adjacent) helps you remember them.
Finding angles
Use the inverse functions:
- A = arcsin(a ÷ c) = arccos(b ÷ c) = arctan(a ÷ b)
- B = 90° − A
For the 3-4-5 triangle: A = arctan(3 ÷ 4) = 36.87°, B = 53.13°.
Area, perimeter and height
- Area = a × b ÷ 2 (half the product of the legs)
- Perimeter = a + b + c
- Height to the hypotenuse = a × b ÷ c
For 3-4-5: area 6, perimeter 12, height 2.4.
Solving with one side and one angle
If you know the hypotenuse c = 10 and angle A = 30°:
- a = c × sin A = 10 × 0.5 = 5
- b = c × cos A = 10 × 0.866 = 8.66
- B = 90° − 30° = 60°
If you know a leg and an angle, use tan: with b = 12 and A = 40°, a = 12 × tan 40° = 10.07, and c = 12 ÷ cos 40° = 15.66.
Special right triangles
Two right triangles come up so often that their ratios are worth remembering:
| Triangle | Angles | Side ratios |
|---|---|---|
| 45-45-90 | 45°, 45°, 90° | 1 : 1 : √2 |
| 30-60-90 | 30°, 60°, 90° | 1 : √3 : 2 |
In a 30-60-90 triangle, the side opposite 30° is half the hypotenuse. In a 45-45-90 triangle, the hypotenuse is the leg × √2 ≈ 1.414.
Pythagorean triples
Whole-number right triangles include 3-4-5, 5-12-13, 8-15-17, 7-24-25 and 20-21-29, and any multiple of them (6-8-10, 9-12-15). Builders use the 3-4-5 rule to check that corners are square: measure 3 units along one wall and 4 along the other, and the diagonal should be exactly 5.
Real-world uses
- Construction: checking square corners, roof rafters, stair stringers and ramps. Our roof pitch calculator and stair calculator apply these formulas to specific jobs.
- Ladders: a ladder against a wall forms a right triangle. Safety guidance often uses the 4-to-1 rule (1 unit out from the wall for every 4 units up), which gives an angle of about 76°.
- Navigation and surveying: finding distances and heights you can't measure directly.
- Screens: a TV's diagonal is the hypotenuse of its width and height.
- Physics: splitting forces and velocities into horizontal and vertical parts.
Measuring heights with a right triangle
To estimate the height of a tree or building, stand a known distance away and measure the angle to the top (many phone apps can measure angles). Height ≈ distance × tan(angle) + your eye height. At 20 m from a tree with a 35° angle and eye height of 1.6 m: 20 × tan 35° + 1.6 = 14.0 + 1.6 ≈ 15.6 m.
A worked example
Maya is building a wheelchair ramp. It must rise 0.5 m, and local guidance limits the slope to 1:12 (1 unit of rise for every 12 of run).
- The run must be at least 0.5 × 12 = 6 m (side b).
- In the right triangle calculator with a = 0.5 and b = 6: the ramp surface (hypotenuse) is 6.02 m, and the angle is 4.76°.
She orders 6.1 m of decking for the surface, allowing a little extra for trimming.
Who uses a right triangle calculator
Students use it for trigonometry and geometry homework. Builders, carpenters and DIYers use it for roofs, stairs, ramps and framing. Engineers, surveyors and designers use it for quick checks, and teachers use it to prepare examples.
Need more customers from Google?
This tool is free and runs in your browser. If your business also needs more leads or sales, Google Ads is where people search with their wallet out. That is the whole job of DeepRit: a PPC-only agency that sets up and runs Google Ads accounts so every click is accounted for. You keep full ownership of your account, get a written report every week, and can stop at any time. See our pricing or ask for a free audit.
Pythagorean triples
Some right triangles have three whole-number sides. These sets are called Pythagorean triples. The best known is 3, 4, 5, because 3² + 4² = 9 + 16 = 25 = 5². Others include 5, 12, 13 and 8, 15, 17 and 7, 24, 25. Any multiple of a triple is also a triple, so 6, 8, 10 and 30, 40, 50 work too. Builders have used the 3-4-5 rule for centuries to set out square corners: measure 3 units along one wall, 4 units along the other, and adjust until the diagonal between the two marks is exactly 5 units. The right triangle calculator confirms any set of sides instantly.
Checking whether a triangle is right-angled
You can also work backwards. If you know all three sides, square the two shorter sides and add them. If the total equals the square of the longest side, the triangle has a right angle. If the total is bigger, the largest angle is acute (less than 90°); if it's smaller, the largest angle is obtuse (more than 90°). For sides 6, 7 and 9: 36 + 49 = 85, and 9² = 81, so the triangle is acute but close to right-angled.
Slopes, ramps and pitches
Many slopes are described by a rise and a run, which are the two shorter sides of a right triangle. A wheelchair ramp with a 1:12 slope rises 1 unit for every 12 units of run. Its angle is the inverse tangent of 1 ÷ 12, about 4.76°, and its sloping length for a 0.5 m rise and 6 m run is √(0.5² + 6²) ≈ 6.02 m. A roof described as 6 in 12 rises 6 inches for every 12 inches across, giving an angle of about 26.6°. Enter the rise and run into the right triangle calculator to get the angle and the sloping length in one step.
Common mistakes
- Mixing up the hypotenuse. The hypotenuse is always the longest side and always opposite the right angle. If your result for the hypotenuse is shorter than one of the legs, something's wrong.
- Using the wrong angle mode. Calculators set to radians give strange results for angles you meant in degrees. The right triangle calculator works in degrees throughout.
- Rounding too early. Keep full precision until the final step, especially when you use one result to find another.
- Mixing units. Enter all lengths in the same unit, such as all metres or all feet.
The six ratios in a right triangle
Every acute angle in a right triangle has six trigonometric ratios, each comparing two sides:
- Sine = opposite ÷ hypotenuse
- Cosine = adjacent ÷ hypotenuse
- Tangent = opposite ÷ adjacent
- Cosecant = hypotenuse ÷ opposite (1 ÷ sine)
- Secant = hypotenuse ÷ adjacent (1 ÷ cosine)
- Cotangent = adjacent ÷ opposite (1 ÷ tangent)
The memory aid SOH-CAH-TOA covers the first three. Because the two acute angles add up to 90°, the sine of one angle always equals the cosine of the other. In a 3-4-5 triangle, the angle opposite the side of 3 has a sine of 3/5 = 0.6, and the other acute angle has a cosine of 3/5 = 0.6 too.
Area and perimeter
The area of a right triangle is half the product of the two legs, because the legs are the base and the height. A triangle with legs of 6 and 8 has an area of 24 square units, and its hypotenuse is 10, so its perimeter is 6 + 8 + 10 = 24 units. The right triangle calculator gives the area and perimeter automatically, along with the missing sides and angles.
Height to the hypotenuse
The altitude from the right angle to the hypotenuse is another useful measurement. It equals the product of the legs divided by the hypotenuse. For legs of 6 and 8, the altitude is 6 × 8 ÷ 10 = 4.8. This altitude splits the original triangle into two smaller right triangles, both similar to the original one. Carpenters and engineers use this property when they work out the depth of a brace or a support that meets a sloping beam at a right angle.
Checking your answer
After using the right triangle calculator, do a quick check. The hypotenuse must be the longest side. The two acute angles must add up to 90°. And the squares of the legs must add up to the square of the hypotenuse, allowing for small rounding differences. If all three checks pass, your answer is consistent.
Sources and further reading
- Right triangle on Wikipedia: properties and formulas.
- Pythagorean theorem on Wikipedia: proofs and history.
- Trigonometric functions on Wikipedia: sine, cosine and tangent.
Frequently asked questions
How do I find the hypotenuse?
c = √(a² + b²). For legs 3 and 4, the hypotenuse is 5.
How do I find an angle in a right triangle?
Use inverse trig: A = arctan(a ÷ b), or arcsin(a ÷ c), or arccos(b ÷ c).
What is SOH CAH TOA?
A memory aid: sine = opposite ÷ hypotenuse, cosine = adjacent ÷ hypotenuse, tangent = opposite ÷ adjacent.
How do I find the area of a right triangle?
Multiply the two legs and divide by 2.
Can I solve a right triangle with two angles?
No. You need at least one side to fix the size.
Is the right triangle calculator free?
Yes. It's free, needs no sign-up, and works in your browser.
Free PPC audit
See where your ad budget leaks.
We look at your Google Ads account before the call, then walk you through what we'd fix first, in dollars. No obligation, no hard sell.