Right Triangle Calculator

Solve right-triangle sides, angles, area, and perimeter with the Pythagorean theorem.

Right Triangle Calculator

Solve missing sides with the Pythagorean theorem (plus angles, area, and perimeter).

One perpendicular side (positive number).
The other perpendicular side (positive number).
Longest side opposite the 90° angle. Leave blank to solve for it.
Adds a short, copyable breakdown of the math to the output.
Tip: If you enter all three sides, the tool switches to validation mode and checks whether your measurements form a right triangle (treating c as the hypotenuse).
Processing…
No output yet
Enter any two sides and click Calculate. Use the defaults (3 and 4) for a quick 3–4–5 example.
Copied

About Right Triangle Calculator

Right Triangle Calculator (Pythagorean Theorem) for Fast Side & Angle Solving

A right triangle is one of the most useful shapes in math, engineering, construction, and everyday problem solving. When one angle is exactly 90°, the three sides are linked by the Pythagorean theorem, making it possible to solve unknown lengths quickly and reliably. This Right Triangle Calculator helps you find the missing side, verify a triangle, and compute helpful extras like angles, area, and perimeter.

Whether you are checking a set of measurements on a job site, studying geometry, building a ramp, or laying out a diagonal brace for a frame, right triangles appear everywhere. They also show up indirectly: the distance between two points on a map or in a coordinate system is the hypotenuse of a right triangle, and many “diagonal” measurements in design are just Pythagorean calculations in disguise.

This calculator keeps the workflow simple: enter any two sides (legs or hypotenuse) and get a clean, rounded result. If you enable the step-by-step option, you also get a compact breakdown of the formula and substitutions—handy for homework solutions, documentation, or teaching.

How It Works

The calculator is based on the Pythagorean theorem, which states that in a right triangle with legs a and b, and hypotenuse c, the relationship is a² + b² = c². This is not just a rule to memorize: it’s a direct consequence of how area scales with side length, and it remains true regardless of the triangle’s size as long as one angle is 90°.

In practice, the theorem is a “two-knowns solve the third” tool. If the two legs are known, the hypotenuse is the square root of their squared sum. If the hypotenuse and one leg are known, the other leg is the square root of the hypotenuse squared minus the known leg squared. The calculator performs these steps carefully and reports errors when the inputs would produce an impossible triangle (for example, when a supposed hypotenuse is not the longest side).

What you enter

  • Leg a – one of the two perpendicular sides (a > 0).
  • Leg b – the other perpendicular side (b > 0).
  • Hypotenuse c – the longest side opposite the 90° angle (c > 0).
  • Rounding (decimals) – how many decimal places you want in the output.
  • Unit (optional) – a label like cm, m, in, ft, or “px” to keep results readable.
  • Show steps – includes a compact breakdown of the formula and substitutions.

If you provide exactly two sides, the calculator identifies the missing one and computes it. If you provide all three sides, the calculator treats c as the hypotenuse and checks whether a² + b² matches within a practical tolerance. This “check mode” is useful when your measurements come from the real world, where small differences can appear due to rounding, tool precision, or material movement.

Quick example: if a = 3 and b = 4, then c = √(3² + 4²) = √(9 + 16) = √25 = 5. This well-known 3–4–5 triangle is a Pythagorean triple, meaning all three sides are whole numbers. Many field checks and layout techniques rely on these integer triples (like 5–12–13 and 8–15–17) because they make measuring easier and reduce rounding errors.

Key Features

Find the missing side from any two sides

Enter a and b to compute c, or enter c plus one leg to compute the other leg. The calculator automatically uses the correct rearrangement of the theorem and alerts you when values are not physically possible (for example, if the “hypotenuse” is shorter than a leg). This prevents one of the most common mistakes: plugging numbers into the right formula but labeling the sides incorrectly.

Because the result depends on squaring and square roots, tiny changes in input can slightly affect the output. The rounding control lets you decide how much precision you need. For instance, a blueprint might require millimeter-level precision, while a quick DIY measurement might only need one decimal place.

Angle calculations (acute angles)

Once the sides are known, the calculator determines the two acute angles. For a standard right triangle, it computes angles using trigonometric identities such as sin(α) = a / c and sin(β) = b / c. You get angles in degrees, rounded to your chosen precision, which helps with layout, design, and navigation tasks.

Angles are often the missing link between “a triangle on paper” and a real build. Roof pitch, ramp steepness, and stair layout are all angle-driven. When you have a rise and run, the slope angle can be derived from the triangle, and having the angle beside the lengths makes communication easier (for example, specifying a cut angle on a miter saw).

Area and perimeter in one click

Beyond the missing side, you often need totals: area = (a × b) / 2 and perimeter = a + b + c. This tool outputs both so you can move from geometry to material estimates, cost calculations, and reporting without extra steps. For example, area can be used when calculating coverage, surface treatment, or paint requirements on triangular panels, while perimeter may matter for edging, trim, or sealing.

Because the area depends only on the two legs, it remains stable even if the hypotenuse is measured with slight error. That makes it a useful cross-check: if the legs are solid measurements, area and perimeter can reveal whether a diagonal measurement is plausible.

Validation mode when all three sides are provided

If you already have three measurements and want to confirm they form a right triangle, enter all three. The calculator compares to a² + b² and reports the difference so you can spot measurement error, rounding issues, or incorrect assumptions. In a perfect right triangle, the difference is zero. In real life, a small difference is normal; the key is knowing whether the difference is small relative to the scale of the triangle.

This check is also helpful for troubleshooting. If your diagonal seems “too short,” it may be because the diagonal you measured is not truly corner-to-corner, or because the corners are not 90°. If your diagonal is “too long,” it may indicate that the sides are not straight, the measurement path was curved, or the triangle is not right.

Copy-ready output for notes, homework, and reports

The result panel includes a clean, plain-text summary that you can copy to the clipboard or download as a file. This is useful for documenting calculations in project logs, sharing steps with a teammate, or keeping study notes organized. When “Show steps” is enabled, the output also includes a short, readable derivation so you can see which equation was used and what was substituted.

If you are studying, copying the steps helps reinforce the pattern: identify the unknown, rearrange the theorem correctly, substitute values, compute squares, and then apply the square root. If you are working professionally, the same steps provide traceability when someone asks, “How did you get that diagonal?”

Use Cases

  • Construction & carpentry: Confirm squareness, compute diagonal bracing, and verify 3–4–5 triangle layouts. Many crews use 6–8–10 (a scaled 3–4–5) because it is easy to measure with common tape lengths.
  • Architecture & interior design: Calculate diagonals for rooms, ramps, stairs, and pitched elements from rise/run measurements. Diagonal checks are especially useful for verifying that a rectangular space is actually square.
  • DIY projects: Find the correct length for supports, shelves, and frames when only two dimensions are known. Common examples include angled shelf braces, picture-frame corner reinforcements, and simple A-frame structures.
  • Education: Practice right-triangle problems, check homework, and understand how rearranging formulas changes the unknown. The step-by-step breakdown helps you see why subtracting squares is necessary when solving for a leg.
  • Engineering: Quickly compute component lengths in orthogonal systems, link geometry with trigonometry, and validate measurement sets. The same math appears in vector magnitude calculations and orthogonal projections.
  • 3D printing & maker work: Determine diagonals, offsets, and jig dimensions where right angles are assumed. When designing a bracket or fixture, the diagonal often sets clearance and fit.
  • Mapping and coordinates: Compute straight-line distance between two points using the same logic as the distance formula in the plane (Δx and Δy act like legs of a right triangle).

In most real tasks, the goal is not just “get the missing side,” but to do it fast, avoid errors, and keep a record of the math. This tool is designed for exactly that: predictable inputs, clear results, and optional steps when you need to explain your work.

If you want to build intuition, try entering simple ratios and scaling them up. For instance, if 3–4–5 works, then 30–40–50 also works because multiplying all sides by the same factor preserves the right-triangle relationship. This scaling idea is why Pythagorean triples are so practical: they stay “clean” at many sizes.

Optimization Tips

Use consistent units and label them

Mixing centimeters and meters (or inches and feet) is a common source of mistakes. Pick a unit, convert values before you enter them, and add a unit label so the output remains clear when you copy it elsewhere. If you are working with feet and inches, consider converting to a single unit (like inches) for calculation and converting back for presentation.

Choose rounding based on the problem

If your measurements come from a tape measure, extra decimals rarely add accuracy. If values are from a CAD model or a survey instrument, higher precision may make sense. Match the decimals to the quality of your input data to avoid false precision, and remember that squaring amplifies error: a small error in a leg becomes larger when squared.

Validate real-world measurements with the check mode

When you have three sides from a real object, small discrepancies are normal. Use the validation output to see how far off the triangle is from perfectly right. If the difference is large, re-check which side is the true hypotenuse and confirm the measurements. Also verify that your “legs” are truly perpendicular; even a small angle drift away from 90° can cause noticeable diagonal differences on large spans.

FAQ

No. You can enter either both legs (a and b) to compute the hypotenuse, or you can enter the hypotenuse plus one leg to compute the other leg. The only requirement is that you provide at least two sides. If you only have one side, there are infinitely many right triangles that match, so a unique solution is not possible.

The calculator switches to a validation check. It assumes c is the hypotenuse and compares to a² + b². You will see whether the values form a right triangle and how large the difference is, which helps diagnose measurement or rounding issues. If the triangle is close but not exact, consider that real measurements often include small error and that rounding can hide the last digits.

Some combinations are not physically possible for a right triangle. For example, the hypotenuse must be longer than either leg, and computing a leg requires c² − a² (or c² − b²) to be positive. If the math would require taking the square root of a negative number, the inputs do not describe a valid right triangle. This can happen if the wrong side was labeled as c, if a measurement was entered incorrectly, or if the shape is not actually a right triangle.

After the sides are known, the tool uses standard trigonometry. A common approach is α = asin(a / c) and β = asin(b / c), which yields the two acute angles in degrees. The angles will always add up to 90° (within rounding tolerance). If you prefer, you can think of the angles as slope or pitch measures: the steeper the triangle, the larger the angle opposite the longer leg.

This tool is specifically for right triangles (one 90° angle). For other triangles you typically need the law of cosines, the law of sines, or additional angle information. If you are unsure, try the validation mode with all three sides: if it does not satisfy the right-triangle relationship, the triangle is not right (or the measurements are inconsistent). In that case, treat the result as a diagnostic signal and choose a more general triangle solver.

Why Choose This Tool

A reliable right-triangle calculator should do more than output a single number. It should prevent common mistakes (like mixing up the hypotenuse), provide angles and derived values that you often need next, and keep the output easy to reuse. This tool focuses on clarity: enter the sides you know, get the missing side, and optionally see the steps so the math stays transparent. The result format is designed for real work, so you can copy it into a report, a homework solution, a build log, or a message without reformatting.

Because the workflow is lightweight and the interface is built around sensible defaults, you can solve typical right-triangle tasks in seconds: diagonals, offsets, pitch angles, and fast checks for squareness. When accuracy matters, the rounding control and validation output help you understand how your measurements behave under the Pythagorean relationship. That combination—speed, clarity, and practical safeguards—makes it a dependable tool for students and professionals alike.