Right Triangle Calculator
Solve a right triangle from two known measurements, then review every side, the area, perimeter, acute angles, and altitude in one consistent result set.
Triangle inputs
Positive values onlyLive results
Valid 3 – 4 – 5 triangleComputed from c = √(a² + b²).
Complete triangle details
| Quantity | Symbol | Value | Interpretation |
|---|---|---|---|
| Leg | a | 3 m | Perpendicular side opposite α |
| Leg | b | 4 m | Perpendicular side opposite β |
| Hypotenuse | c | 5 m | Longest side, opposite 90° |
| Area | A | 6 m² | One-half of a × b |
| Perimeter | P | 12 m | Sum of all three sides |
| Acute angle | α | 36.87° | Angle opposite leg a |
| Acute angle | β | 53.13° | Angle opposite leg b |
| Altitude to hypotenuse | h | 2.4 m | Perpendicular distance from the right angle to c |
How to use the right triangle calculator
What this calculator does
This calculator solves a right triangle when you know two compatible measurements. It finds both perpendicular legs, the hypotenuse, area, perimeter, two acute angles, and the altitude drawn from the right-angle vertex to the hypotenuse. It is useful for checking geometry exercises, estimating diagonal lengths in layouts, planning ramps or braces, and converting a measured area plus one leg into a complete triangle. It assumes an ideal flat Euclidean triangle with exactly one 90° angle; it does not account for material thickness, surveying curvature, construction tolerances, or measurement uncertainty.
When to use it
- Find a rectangular diagonal when the horizontal and vertical spans are known.
- Recover a missing leg when a hypotenuse and the other leg have been measured.
- Determine a triangle's remaining dimensions from its area and one perpendicular side.
- Verify a hand calculation before using the dimensions in a drawing, worksheet, or estimate.
How to calculate
The calculator opens with a complete 3 – 4 – 5 demonstration triangle, so the results and a validated Excel workbook are available immediately. To solve your own triangle:
- Choose the matching pair under What do you know?. The editable fields change to match that choice, while solved fields become read-only.
- Choose a Length unit. Switching among mm, cm, m, in, and ft converts every current length and area value, including solved fields and workbook data.
- Replace the two editable sample values with positive decimal measurements. Commas are accepted only as standard thousands separators, such as 1,250.5; decimal commas and scientific notation are rejected to avoid ambiguity.
- Read the highlighted Hypotenuse (c), the four live result cards, and the Complete triangle details table. Results update as you type.
- Select Download Excel to export the current typed inputs and canonical calculated values. Select Reset to clear the demonstration and all results; export remains unavailable until a complete valid pair is entered again.
Input guide
What do you know? is required and selects one of five supported pairs: two legs; leg a with hypotenuse c; leg b with hypotenuse c; leg a with area; or leg b with area. Choose the pair that exactly matches your source data. A common mistake is treating a leg as the hypotenuse; c must be the longest side.
Length unit is required as a label but does not convert the numeric values when changed. Select mm, cm, m, in, or ft. Existing values are converted to the new unit, and area is converted by the square of the length factor, such as m² to cm². NIST's overview of SI length units explains standard metric length notation.
Leg (a) and Leg (b) are positive lengths that meet at the right angle. Each is required only when the chosen pair includes it. Values such as 3, 4.5, or 1,250 are accepted. Increasing either leg increases the area and hypotenuse. Do not enter zero, a negative number, a unit symbol, or a value above one trillion.
Hypotenuse (c) is the positive side opposite the 90° angle. It is editable only in a hypotenuse pair and must be strictly longer than the known leg. For example, c = 13 and a = 5 produces b = 12. Entering c equal to or shorter than the leg is geometrically impossible and is rejected.
Area is a positive squared-unit value and is editable only in an area pair. For example, area = 30 m² with a = 5 m gives b = 12 m. Do not enter a linear unit in this field or forget that the area unit is squared.
Output guide
Hypotenuse (c), Leg (a), and Leg (b) are exact geometric identities derived from the selected pair, displayed with practical decimal rounding. Area is the enclosed surface in square units. Perimeter is the sum a + b + c. In the details table, Acute angle α is opposite a, Acute angle β is opposite b, and the two always sum to 90°. Altitude to hypotenuse (h) is the perpendicular distance from the right-angle vertex to c. A smaller altitude indicates a flatter triangle; a larger value indicates a more balanced shape for a given hypotenuse.
The summary pills repeat the selected known pair, hypotenuse, area, and angles so the most important facts remain visible. The table's Quantity, Symbol, Value, and Interpretation columns use the same canonical model as the result cards and Excel file. Zero or negative outputs are not meaningful for this calculator; an invalid or incomplete pair replaces all computed content with a compact empty state.
Worked example
The startup example uses Two legs (a and b), meters, a = 3 m, and b = 4 m. The Pythagorean theorem gives c = √(3² + 4²) = √25 = 5. The area is 3 × 4 ÷ 2 = 6 m², and the perimeter is 3 + 4 + 5 = 12 ms. The acute angles are approximately 36.87° and 53.13°, and the altitude to the hypotenuse is 3 × 4 ÷ 5 = 2.4 ms. These values match the first-open controls, result cards, details table, and exported workbook.
For a textbook treatment of the theorem and triangle properties, see the OpenStax Pythagorean theorem lesson. For a deeper catalog of right-triangle relationships, consult Wolfram MathWorld's right triangle reference.
How the formulas change with the known pair
With both legs known, the calculator applies c = √(a² + b²). With c and one leg known, it rearranges the theorem to calculate the other leg, such as b = √(c² – a²). With an area and one leg known, it first rearranges A = a × b ÷ 2 to obtain the other leg, then calculates c. The angles come from inverse tangent relationships, and the altitude comes from equating the two area formulas: a × b ÷ 2 = c × h ÷ 2.
Accuracy and interpretation
Displayed values use up to six decimal places and trim unnecessary trailing zeros. The internal model retains JavaScript floating-point precision, and the workbook stores numeric cells rather than formatted text. For very large or extremely close measurements, measurement quality usually matters more than the final displayed decimal. Keep all known lengths in one unit, square that unit only for area, and round only at the end of your real-world workflow.