Skip to calculator
Veomark

Free · Instant · No signup

Pythagorean Theorem & Triangle Solver

Fill any two of a, b, and hypotenuse c (0 means unknown) and compute the missing side.

Page updated 2026-09-04.

Pythagorean Theorem & Triangle Solver visual
Sponsored

Calculator

0 = unknown. Default 3.

0 = unknown. Default 4.

0 = unknown. Default 0.

Calculated Results

a

--

b

--

c

--

Sponsored

Solving for whichever side is left blank

With leg a = 3 and leg b = 4 (and c left at 0 to mark it as unknown), the solver finds c = 5 -- the classic 3-4-5 right triangle, one of the simplest whole-number examples of the Pythagorean relationship a² + b² = c².

3² + 4² = 9 + 16 = 25, and the square root of 25 is exactly 5 -- this specific triangle is a favorite teaching example precisely because every value comes out to a clean whole number, unlike most random leg lengths, which produce an irrational hypotenuse.

This solver works for whichever side you leave as the unknown (marked by entering 0) -- set a and c and leave b at 0, and it solves for the missing leg instead, using the rearranged formula b = sqrt(c² - a²).

What happens if all three sides are already known

Right triangle only. If all three are set, the identity is checked. If you enter nonzero values for all three sides at once, the calculator checks whether they actually satisfy a² + b² = c² rather than solving for anything -- useful for verifying whether a triangle you already have measurements for is genuinely a right triangle.

This only applies to right triangles specifically -- the Pythagorean theorem doesn't hold for triangles without a 90-degree angle, so entering three sides of a non-right triangle would fail the identity check rather than confirm anything.

If two sides are entered as equal to or exceeding what a valid right triangle would require (like a leg longer than the hypotenuse), no valid solution exists, since a leg can never be longer than the hypotenuse in a right triangle.

Related geometry tools

For a circle-based geometry calculation instead of a triangle, the Circle Area, Perimeter & Arc Calculator covers that separate shape.

For extending into three dimensions rather than a flat triangle, the Volume of 3D Shapes Calculator is the related next step.

Frequently Asked Questions (FAQ)

How is c = 5 derived from legs of 3 and 4?

Using the Pythagorean theorem: c = sqrt(a² + b²) = sqrt(3² + 4²) = sqrt(9 + 16) = sqrt(25) = 5.

How do I solve for a leg instead of the hypotenuse?

Enter the hypotenuse and the known leg, and leave the unknown leg at 0. The calculator rearranges the formula accordingly -- for example, b = sqrt(c² - a²) when solving for leg b.

What happens if I enter values for all three sides?

Right triangle only. If all three are set, the identity is checked. The calculator checks whether a² + b² = c² actually holds for the three values you entered, rather than solving for anything -- useful for confirming whether a triangle you've already measured is genuinely a right triangle.

Does this work for triangles that aren't right triangles?

Right triangle only. If all three are set, the identity is checked. No. The Pythagorean theorem is specific to right triangles (those with a 90-degree angle). For non-right triangles, a different relationship (like the Law of Cosines) is needed instead.

Can a leg ever be longer than the hypotenuse?

No, never, in a valid right triangle -- the hypotenuse is always the longest side, opposite the right angle. If entered values imply a leg longer than the hypotenuse, no valid right triangle solution exists for those numbers.