# Right Triangle Calculator

URL: https://speedycalculator.com/calculators/math/right-triangle/
Last updated: 2026-10-25

> The right triangle calculator solves a right triangle from its two legs: it gives the hypotenuse, both acute angles, the area, perimeter and altitude to the hypotenuse.

## Inputs

- Leg a (m, cm, mm, km, in, ft, yd, mi)
- Leg b (m, cm, mm, km, in, ft, yd, mi)

## Results

- Hypotenuse
- Angle α (opposite a)
- Angle β (opposite b)
- Area
- Perimeter
- Altitude to hypotenuse

## Formula

```
c = √(a² + b²),  α = atan(a ÷ b),  β = 90° − α
```

## Explanation

Right triangles are the basis of trigonometry, surveying, carpentry and navigation.

### How to use the Right Triangle Calculator

- **Leg a**
- **Leg b**

Results update as you type, and every field accepts the units shown in its menu.

### How it works

Pythagoras gives the hypotenuse; the arctangent of the leg ratio gives the angles.

### Inputs explained

FieldWhat to enterLeg aUnits: m, cm, mm, km, in, ft …Leg bUnits: m, cm, mm, km, in, ft …

### What each result means

- **Hypotenuse** = sqrt([Leg a]^2 + [Leg b]^2)
- **Angle α (opposite a)** = deg(atan2([Leg a], [Leg b]))
- **Angle β (opposite b)** = 90 - [Angle α (opposite a)]
- **Area** = [Leg a]×[Leg b]÷2
- **Perimeter** = [Leg a] + [Leg b] + [Hypotenuse]
- **Altitude to hypotenuse** = [Leg a]×[Leg b]÷[Hypotenuse]

### Example values

How the main result changes when **Leg a** changes and everything else stays at the example values above:

Leg a (m)Hypotenuse (m)2.512.263.7512.575136.2513.537.514.151015.62

## Worked example

Inputs — Leg a: 5 m; Leg b: 12 m.

Results — **Hypotenuse = 13 m**; Angle α (opposite a) = 22.62 °; Angle β (opposite b) = 67.38 °; Area = 30 m²; Perimeter = 30 m; Altitude to hypotenuse = 4.62 m.

## FAQ

**What is a 3-4-5 triangle?**
A right triangle with whole-number sides, used to check square corners.

**Can I enter an angle instead?**
Use the trigonometry calculator with an angle and a side.

**What formula does the Right Triangle Calculator use?**
c = √(a² + b²),  α = atan(a ÷ b),  β = 90° − α.

