About Contact
Tools
1 Rep Max Calculator — Estimate Your 1RM From Any Set401(k) CalculatorAge Calculator — Your Exact Age in Years, Months & DaysAmortization CalculatorAsphalt CalculatorAsphalt Driveway Cost CalculatorAuto Loan CalculatorBarcode GeneratorBase64 EncoderBd Ft CalculatorBench Press Max Calculator — Estimate Your Bench 1RMBMR Calculator — Estimate Your Basal Metabolic RateBoard Foot CalculatorBrick CalculatorCalorie Deficit Calculator — Daily Target and TimelineCD Calculator (Certificate of Deposit)Cement CalculatorCircle Area Calculator — Area, Radius, Diameter, CircumferenceColor Palette GeneratorCompound Interest CalculatorConcrete Bag CalculatorConcrete Block CalculatorConcrete CalculatorConcrete Calculator with CostConcrete Footing CalculatorConcrete Mix CalculatorConcrete Pad CalculatorConcrete Price CalculatorConcrete Slab CalculatorConcrete Slab Cost CalculatorConcrete Volume CalculatorConcrete Weight CalculatorConcrete Yard CalculatorConduit Fill CalculatorCrushed Stone CalculatorDirt CalculatorDrywall CalculatorDue Date Calculator — Estimate Your Baby's Due DateFantasy Name GeneratorFavicon GeneratorFence CalculatorFill Dirt CalculatorFinal Exam Calculator — What Grade Do I Need on the Final?Fraction Calculator — Add, Subtract, Multiply, DivideFree Citation Generator (APA, MLA, Chicago, Harvard)GPA Calculator — Unweighted and Weighted, with Cumulative GPAGravel CalculatorHEIC to JPG ConverterHELOC CalculatorInsulation CalculatorLandscape Rock CalculatorMacro Calculator — Daily Protein, Carbs, and FatMean Calculator — Average of a List of NumbersMedian Calculator — Middle Value of a List of NumbersMeme GeneratorMetal Roof CalculatorMinute to Decimal ConverterMorse Code ConverterMortgage Payoff CalculatorMulch CalculatorOvulation Calculator — Find Your Fertile WindowPaver Base CalculatorPaver CalculatorPaver Sand CalculatorPea Gravel CalculatorPeptide CalculatorPercentage Calculator — Solve Any Percent QuestionPNG to PDF ConverterPuppy Weight CalculatorPythagorean Theorem Calculator — Solve Any Right TriangleQuadratic Formula Calculator — Roots, Vertex, Factored FormQuikrete Concrete CalculatorRaised Bed Soil CalculatorRandom Name GeneratorRiver Rock CalculatorRock CalculatorRoof Cost CalculatorRoof Pitch CalculatorRoof Shingle CalculatorRoof Slope CalculatorRoof Truss CalculatorRubik's Cube Solver — Solve Any Scrambled 3×3 CubeSakrete Concrete CalculatorSales Tax CalculatorSand CalculatorScrap Silver CalculatorSignature GeneratorSleep Calculator — Best Bedtimes & Wake Times by Sleep CycleSlope Calculator — Slope, Equation, Angle, GradeSnow Day CalculatorSod CalculatorSoil CalculatorSonotube Concrete CalculatorSquare Footage Calculator — Room and Floor AreaSquat Max Calculator — Estimate Your Squat 1RMStandard Deviation Calculator — Sample and PopulationStone CalculatorTDEE Calculator — Total Daily Energy ExpenditureTier List MakerTile CalculatorTime Calculator for WorkTop Soil CalculatorTopsoil CalculatorTriangle Calculator — Solve Any Triangle From 3 InputsUPC GeneratorUsername GeneratorVolume Calculator — 8 Shapes With Unit ConversionWebP to JPG ConverterWebP to PNG ConverterWordle Solver — Best Next Guess for Today's Puzzle
← All tools

Pythagorean Theorem Calculator — Solve Any Right Triangle

Type any two sides of a right triangle. Get the third side, both angles, perimeter, and area.

Units
Side a
Side b
Side c
Angle α
Angle β
Right angle
Perimeter
Area

What is pythagorean theorem calculator?

The Pythagorean theorem is the single most-cited identity in school geometry: in a right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides — a² + b² = c². The legs (a and b) are the two sides that form the right angle; the hypotenuse (c) is the side opposite the right angle and is always the longest side of the triangle. This calculator works in both directions: given two of the three sides, it solves for the third.

To use the calculator, type any two of the three sides and leave the unknown one blank. The calculator detects which side is missing and computes it directly. When both known sides are whole numbers and the answer is irrational, you’ll see an exact form line underneath — like √41 or 3√2 — which is the form most geometry teachers want on a worksheet. The result panel also includes both non-right angles in degrees, the perimeter, the area, and a scaled drawing of your triangle so you can sanity-check the shape.

Privacy is the final detail worth naming. Every calculation runs locally in your browser; the side lengths you type never leave your device. There is no server, no API call, no analytics on input values. The only state saved between visits is your unit preference — cm, m, in, or ft — stored in localStorage so the toggle remembers your last choice.

When to use a pythagorean theorem calculator

  • Geometry homework — solve for the missing side — A textbook problem gives two sides of a right triangle and asks for the third. Type the two known sides; the third appears at the top of the result panel along with the exact form (e.g., √41) for the work-shown answer your teacher is looking for.
  • Carpentry and framing — squaring a corner — Measure two leg lengths along a wall and a floor; the diagonal that proves the corner is square is the hypotenuse. The 3-4-5 trick scales: if your legs are 6 ft and 8 ft, the diagonal should read 10 ft. Flip the unit selector to ft or in and read the answer directly.
  • TV or monitor diagonal from width and height — Spec sheets advertise the diagonal — that's the hypotenuse. If you know the visible width and height of a screen (or a TV box), enter them as a and b and read the diagonal as c. The same calculation works the other way: enter the diagonal and one dimension to recover the other.

How to use the Pythagorean Theorem Calculator — Solve Any Right Triangle

  1. Pick your unitChoose cm, m, in, or ft from the segmented control. The choice is cosmetic — it appends the unit suffix to every displayed length and is remembered for next time. Switching units does not convert the numbers you've typed.
  2. Enter any two of the three sidesType whichever two side lengths you know. Leave the unknown side blank — the calculator detects which side is missing and solves for it. Fill all three sides if you want a quick check; the calculator shows c computed from a and b in that case.
  3. Read the missing side at the top of the resultThe headline shows which side was solved for and its value. When both known sides are whole numbers and the answer is irrational, an exact-form line (like √41 or 3√2) appears underneath.
  4. Read angles, perimeter, area, and the diagramThe stats list shows both non-right angles (in degrees), the perimeter, and the area. Next to it, a scaled SVG drawing of your triangle with side labels and the right-angle square at the corner. For very-different leg lengths the drawing is clamped to a minimum aspect for legibility — a (not to scale) note appears when this triggers.

Worked examples

a = 3 cm, b = 4 cm

Input:  Side a 3 cm, Side b 4 cm
Output: Hypotenuse c = 5 cm

The canonical Pythagorean triple — 3, 4, 5 — and the easiest way to verify the calculator is working.

a = 5 m, c = 13 m

Input:  Side a 5 m, Side c 13 m
Output: Side b = 12 m

A 5-12-13 triple, solved for a leg instead of the hypotenuse. Leave b blank, fill a and c.

a = 4 in, b = 5 in

Input:  Side a 4 in, Side b 5 in
Output: Hypotenuse c ≈ 6.4031 in (exact: √41)

An irrational result with both legs as integers — the calculator shows both the decimal answer (rounded to 4 places) and the simplified surd.

Frequently asked questions

What is the Pythagorean theorem?
The Pythagorean theorem says that in a right triangle, the square of the hypotenuse (the side opposite the right angle) equals the sum of the squares of the other two sides: a² + b² = c². It only holds for right triangles — triangles with one 90° angle — and is one of the oldest and most-used identities in geometry.
How do I find the hypotenuse?
Square both legs, add them, then take the square root: c = √(a² + b²). For a 3-4-5 right triangle: √(9 + 16) = √25 = 5. For 4 and 5: √(16 + 25) = √41 ≈ 6.4031. Type the two legs as a and b, leave c blank, and the calculator does the work.
How do I find a leg when I know the hypotenuse and the other leg?
Subtract the known leg's square from the hypotenuse's square, then take the square root: a = √(c² − b²). For a 5-12-13 triangle, given c = 13 and b = 5: √(169 − 25) = √144 = 12. Leave the unknown leg blank in the form; the calculator handles either leg-given branch.
What does the exact form (√41, 3√2) mean and when does it appear?
When both known sides are whole numbers and the computed side is irrational, the calculator shows the simplified surd (the smallest expression of the form k√m) underneath the decimal answer. √41 means the square root of 41, which can't be simplified because 41 has no square factor. 3√2 means three times the square root of 2 — the simplification of √18, since 18 = 9 · 2. Most geometry teachers expect the simplified surd as the work-shown answer; the decimal is for sanity-checking.
Does this calculator work for non-right triangles?
No — the Pythagorean theorem only applies to triangles with one 90° angle. For triangles where you know all three sides but no right angle exists, you'd use the law of cosines instead: c² = a² + b² − 2ab·cos(γ). We may add a separate non-right-triangle calculator in the future, but this tool is right-triangle-only.
How are the angles calculated?
Once all three sides are known, the two non-right angles come from arctan: the angle opposite side a is arctan(a/b), and the angle opposite side b is arctan(b/a). The third angle is always 90° because the triangle is right by definition. The calculator uses Math.atan2 internally for numerical stability and reports both angles in degrees, rounded to four decimals.
Why does the calculator say the hypotenuse must be longer than both legs?
Because the Pythagorean identity a² + b² = c² forces it. If c (the side you typed as the hypotenuse) is smaller than or equal to a or b, then the missing leg's square would be zero or negative, which is impossible for a real triangle. When the calculator can't form a valid right triangle from your inputs, it shows that hint instead of returning a misleading answer.
Are my numbers stored or sent anywhere?
No. Every calculation runs locally in your browser. The side lengths you type are never transmitted — there is no server, no API call, no analytics on input values. The only state we save is your unit preference (cm/m/in/ft) in localStorage, so the toggle remembers your choice next visit.