# Right Triangle Calculator

> Solve a right triangle from two legs, a leg and the hypotenuse, or a side and an angle: all three sides, both angles, area, perimeter and altitude.

Category: Algebra, geometry & advanced math · Applies to: Worldwide · Last updated: 2026-10-29
Interactive calculator: https://calculators.geekmidst.com/calculators/right-triangle-calculator

Two measurements, at least one of them a side, fix a right triangle completely. Trigonometry and the Pythagorean theorem give everything else.

Also called: Right-angled triangle calculator, Right triangle solver.

## Inputs
- I know (options: Both legs (a and b), A leg and the hypotenuse, The hypotenuse and an angle, A leg and its opposite angle; default legs)
- Leg a (default 3)
- Leg b (default 4)
- Leg a (default 3)
- Hypotenuse c (default 5)
- Hypotenuse c (default 5)
- Angle A (opposite leg a) (unit °; default 30)
- Leg a (default 3)
- Angle A (opposite leg a) (unit °; default 30)

## Results
- Hypotenuse c
- Leg a
- Leg b
- Angle A
- Angle B
- Area
- Perimeter
- Altitude to the hypotenuse
- Inradius

## Formula

```
c² = a² + b²;  sin A = a ÷ c, cos A = b ÷ c, tan A = a ÷ b;  B = 90° − A;  area = ab ÷ 2;  altitude = ab ÷ c;  inradius = (a + b − c) ÷ 2
```

Where:
- a, b: legs
- c: hypotenuse
- A: angle opposite a
- B: angle opposite b

## Worked example
1. c = √(3² + 4²) = 5.
2. A = arctan(3 ÷ 4) = 36.8699°, so B = 90° − 36.8699° = 53.1301°.
3. Area = 3 × 4 ÷ 2 = 6; perimeter = 3 + 4 + 5 = 12; altitude = 12 ÷ 5 = 2.4.

**Result:** The 3-4-5 right triangle has angles of about 36.87° and 53.13°, area 6 and perimeter 12.

## What the result means

Angles are in degrees. The two acute angles always add up to 90°, so knowing one gives the other.

## Assumptions and limits
- One angle is exactly 90°; angle A is opposite leg a.
- Two angles alone fix only the shape, not the size, so at least one side is required.

## Questions

### What does SOH CAH TOA mean?

Sine = Opposite ÷ Hypotenuse, Cosine = Adjacent ÷ Hypotenuse, Tangent = Opposite ÷ Adjacent. They relate an angle to the sides around it.

### How do I find a roof pitch angle?

Treat the rise and the run as the two legs. The pitch angle is arctan(rise ÷ run), which is angle A when a is the rise and b the run.

## Related calculators
- [Pythagorean Theorem Calculator](https://calculators.geekmidst.com/calculators/pythagorean-theorem-calculator)
- [Distance Calculator](https://calculators.geekmidst.com/calculators/distance-calculator)
- [Circle Calculator](https://calculators.geekmidst.com/calculators/circle-calculator)

Source: GM¹X CalcVerse — https://calculators.geekmidst.com/calculators/right-triangle-calculator
