Pythagorean Theorem Calculator
Solves a right triangle with the Pythagorean theorem, a² + b² = c². Give any two of the two legs, the hypotenuse, the area and the perimeter, and it finds the missing sides, then adds the area, perimeter, both acute angles and the height dropped onto the hypotenuse. Lengths can be in metric or imperial units, from millimetres to nautical miles, and the area in anything from square millimetres to acres. Handy for checking that a corner is square, sizing a ladder or ramp, or finding a diagonal.
- The triangle has an exact right angle between sides a and b.
- All lengths use the same unit, and the area uses the chosen area unit.
Formula
a² + b² = c²; c = √(a² + b²); a = √(c² − b²); area = ½ a b; perimeter = a + b + c
- a and b are the legs that meet at the right angle, and c is the hypotenuse, the side opposite it. The hypotenuse is always the longest side.
- From one leg and the area, the other leg is 2 × area ÷ leg. From the hypotenuse and the area, a + b = √(c² + 4 × area) and a − b = √(c² − 4 × area).
- From a leg and the perimeter, the other leg and the hypotenuse add up to q = perimeter − leg, and their difference is leg² ÷ q.
- From the hypotenuse and the perimeter, a + b = perimeter − c and a × b = ((a + b)² − c²) ÷ 2. From the area and the perimeter, c = (perimeter² − 4 × area) ÷ (2 × perimeter).
- When the two legs are not fixed by the inputs (hypotenuse, area or perimeter only), the longer leg is reported as a. Swapping a and b gives the same triangle.
- The angles are α = arctan(a ÷ b) and β = 90° − α. The height dropped from the right angle onto the hypotenuse is a × b ÷ c.
- Unit conversions use exact definitions (1 in = 2.54 cm, 1 mi = 1,609.344 m, 1 nmi = 1,852 m, 1 acre = 4,046.8564224 m²). Results keep up to 6 decimal places.
Ladder against a wall
Inputs
- What do you know?: a-b
- Length unit: m
- Area unit: m2
- Side a (leg): 3
- Side b (leg): 4
The ladder's foot is 3 m from the wall and it reaches 4 m up. Its length is the hypotenuse: √(3² + 4²) = √25 = 5 m. The triangle under it has an area of 6 m² and angles of about 36.87° and 53.13°.
Sources & references
Frequently asked questions
How do I find the hypotenuse?
Square both legs, add the squares and take the square root. With legs of 7 and 9: 49 + 81 = 130, and √130 ≈ 11.40.
How do I find a missing leg?
Square the hypotenuse, subtract the square of the known leg and take the square root. With a hypotenuse of 13 and a leg of 5: 169 − 25 = 144, so the other leg is 12.
Does the Pythagorean theorem work for any triangle?
No, only for right triangles. For other triangles use the law of cosines, c² = a² + b² − 2ab cos γ, which reduces to the Pythagorean theorem when γ = 90°.
How can I check that a corner is square?
Measure 3 units along one side and 4 along the other. If the distance between the two marks is exactly 5, the corner is a right angle. Multiples such as 6, 8, 10 work too and are more accurate on large layouts.
What are Pythagorean triples?
Sets of three whole numbers that fit a² + b² = c², such as 3, 4, 5; 5, 12, 13; 8, 15, 17 and 7, 24, 25. Multiplying a triple by any whole number gives another one.
Related calculators
Area Calculator Finds the area of 2D shapes: rectangle, square, triangle (from base and height, three sides, two sides and the angle between them, or two angles and the side between them), circle, semicircle, circular sector, ellipse, trapezoid, parallelogram (three ways), rhombus (three ways), kite (two ways), regular pentagon, hexagon and octagon, annulus (ring), any quadrilateral from its diagonals and any regular polygon. Pick the shape, enter its dimensions in any length unit (angles in degrees or radians), and you get the area in that unit squared, plus square metres and square feet, and the perimeter where the inputs fix it. Handy for working out the area of a room, a garden bed or a patio before buying flooring, mulch or bricks. Quadratic Formula Calculator Solves any quadratic equation with the quadratic formula, x = (−b ± √(b² − 4ac)) ÷ 2a. Enter the equation in standard, vertex or factored form and get both roots as decimals and in exact simplified radical form, the discriminant and what it says about the roots, the vertex, the axis of symmetry, the y-intercept and the equation rewritten in all three forms. Switch on complex roots to solve equations with a negative discriminant, and show the working step by step. Average Calculator Finds the average (arithmetic mean) of a list of numbers, together with the count, sum, median, geometric mean, smallest and largest value and the range. Paste or type the numbers separated by commas, spaces or semicolons, in any mix. Anything that is not a number is skipped and listed, so you can see exactly which values went into the result. Useful for test scores, prices, measurements or any other set of data.