What Is the Pythagorean Theorem?
It is a statement about areas before it is a statement about lengths, and that is the version which makes the rest of the page obvious rather than memorized.
Two right triangles turn up so often that their side ratios are worth memorizing rather than computing, starting with the isosceles case in the 45-45-90 Triangle Calculator.
The Statement, in Words and in Symbols
Build a square outward on each of the three sides of a right triangle. The square standing on the hypotenuse has exactly the same area as the other two squares put together. Write the legs as a and b and the hypotenuse as c, and that sentence becomes a² + b² = c². Wolfram MathWorld describes it as "this most fundamental of all geometric theorems", and the smallest whole-number case shows why the area reading is the honest one.
a² + b² = c² 3-4-5 triangle square on the first leg 3² = 9 square on the second leg 4² = 16 9 + 16 = 25 square on the hypotenuse 5² = 25
Nothing in the statement mentions size, orientation, or units. A triangle with legs of 3 and 4 inches, 3 and 4 meters, or 3 and 4 miles is the same triangle scaled, and the equation holds in each case — which is why the calculator asks only for numbers and hands the units back to you unchanged.
The relationship also runs in reverse, and the reverse direction is the one that squares up buildings.
Legs, Hypotenuse, and Why c Is Always the Longest
MathWorld sets the vocabulary: the largest side is conventionally written c and called the hypotenuse, while the other two are the legs, sometimes the catheti. You identify the hypotenuse by position rather than by measuring, since it is the one side facing the right angle.
Its length is forced by the equation. Since a² and b² are both positive, c² is strictly larger than either of them on its own, so c is strictly longer than either leg. A right triangle with a "hypotenuse" equal to or shorter than one of its legs does not exist, and no amount of arithmetic will produce one.
That is the geometry behind the refusal you get in leg mode when the two entries arrive in the wrong order: "The hypotenuse must be the longest side — enter leg first, then hypotenuse". Entering 12 and 11 returns that message rather than a number, and so does entering 10 and 10.
The Converse: What Makes a Corner Square
Elements I.48 runs the theorem backward: if the square on one side of a triangle equals the sum of the squares on the other two, then the angle contained by those two sides is right. Nobody has to measure the angle. Measure three lengths, do the arithmetic, and the angle is settled — which is the whole basis of the 3-4-5 check used to square a foundation, a deck frame, or a tile layout.
The comparison keeps working when the equation fails, and Euclid states both failure cases too. Elements II.12 says the square on the side opposite an obtuse angle is greater than the sum of the squares on the other two; II.13 says the square opposite an acute angle is less. So the sign of the difference classifies the triangle:
| Three sides | a² + b² | c² | Largest angle |
|---|---|---|---|
| 3, 4, 5 | 25 | 25 | Right — exactly 90° |
| 3, 4, 4.5 | 25 | 20.25 | Acute — under 90° |
| 3, 4, 6 | 25 | 36 | Obtuse — over 90° |
| 6, 8, 10 | 100 | 100 | Right |
| 6, 8, 11 | 100 | 121 | Obtuse |
| 5, 12, 12 | 169 | 144 | Acute |
| 8, 15, 16 | 289 | 256 | Acute |
| 20, 21, 29 | 841 | 841 | Right |
This calculator does not run that test. It assumes the right angle is there and works from two sides, so it will happily treat a badly measured corner as square and return a confident number. The test above is three squarings and a comparison; do it by hand whenever the right angle is the thing in doubt.
Euclid, Garfield, and 367 Proofs
Elements I.47 carries what MathWorld calls "perhaps the most famous proof of all times": drop a perpendicular from the right angle to the hypotenuse, continue it across the square built on that side, and each of the two rectangles it creates turns out to have exactly the area of the square on the leg beside it. It is more than 2,000 years old, and the perpendicular is what does the work — it turns a claim about two totals into a match between individual pieces.
The supply never dried up. Cut The Knot, citing Elisha Scott Loomis's The Pythagorean Proposition — reprinted by the National Council of Teachers of Mathematics in 1968 — puts the collection in that book at 367 separate proofs. One of them is by James Garfield, who in 1876 published a proof built on a trapezoid while serving in the House of Representatives, five years before becoming president.
None of that history changes the arithmetic below, but it explains why this one equation gets its own calculator while most formulas share a page.
How Do You Calculate the Pythagorean Theorem?
Three arithmetic steps going forward, three going back, and the calculator shows you both so the working can be checked rather than trusted.
The Pythagorean Theorem Formula, Both Directions
One equation, rearranged twice. To find the hypotenuse you add the squares of the legs and take the square root; to find a missing leg you subtract the known leg's square from the hypotenuse's square and take the square root of what is left. The calculator also derives the rest of the triangle from whichever two sides it ends up with.
Hypotenuse from two legs c = √(a² + b²) Missing leg from the rest a = √(c² − b²) Area (leg × leg) ÷ 2 Perimeter leg + leg + hypotenuse Acute angles arctan(leg ÷ other leg), then 90° minus that
The second line is the first line with b² taken off both sides. It is why the order of entry matters in leg mode: c² − b² has to stay positive, and it only does so when the hypotenuse is the larger of the two numbers you typed.
The area line uses the two legs and never the hypotenuse, because in a right triangle the legs are already a base and a height at right angles to each other. MathWorld gives the same expression for a right triangle's area.
How to Calculate It by Hand
Four steps, in this order, with legs of 3 and 4 as the running example:
- Identify the hypotenuse. It is the side facing the right angle, and it is the longest of the three.
- Square the two sides you know. 3 × 3 = 9 and 4 × 4 = 16.
- Add them if you are after the hypotenuse, subtract if you are after a leg. 9 + 16 = 25.
- Take the square root. √25 = 5, so the hypotenuse is 5.
Going the other way is the same routine with one sign changed. Given a hypotenuse of 10 and a leg of 6: 10 × 10 = 100, 6 × 6 = 36, 100 − 36 = 64, and √64 = 8.
Squaring first and rooting last is not optional. √(3² + 4²) is 5, but 3 + 4 is 7, and the two are not close — the theorem adds areas, not lengths, and the square root at the end is what converts the area back into a length.
Step by Step With This Calculator
Three fields and two buttons, in reading order:
- Solve For — a two-button switch. "Find hypotenuse (know both legs)" is selected when the page loads; "Find a leg (know leg + hypotenuse)" is the other setting.
- First Known Side — a leg in either mode. In leg mode this is the leg you already measured, not the hypotenuse.
- Second Known Side — the other leg in hypotenuse mode, or the hypotenuse itself in leg mode.
- Calculate runs the formula. Reset empties both boxes and returns the panel to its opening state.
The page opens with a dash in the readout rather than a worked example, because both side boxes start blank. Nothing is computed until you press Calculate, and nothing recalculates while you type — change a value and press the button again to see the new answer.
Both side boxes are number fields that accept decimals, so 7.5 and 0.75 are as valid as 7 and 75. Blank, zero and negative entries are all refused with the same message, "Enter both known sides", so the calculator never returns an answer for a triangle that cannot exist.
Worked Example: Legs of 3 and 4
Leave the switch on "Find hypotenuse", type 3 in the first box and 4 in the second, and press Calculate. The hand working and the panel agree line for line.
First leg squared 3² = 9 Second leg squared 4² = 16 Sum 9 + 16 = 25 Hypotenuse √25 = 5 Area (3 × 4) ÷ 2 = 6 Perimeter 3 + 4 + 5 = 12 First acute angle arctan(3 ÷ 4) = 36.9° Second acute angle 90° − 36.9° = 53.1°
- What the result panel returns
- 5 | c = √(3² + 4²) = √25 | Right triangle: legs 3 and 4, hypotenuse 5 · area 6 · perimeter 12 | Acute angles: 36.9° and 53.1° — and 3-4-5 style triples make it exact
Nothing here is rounded. The sum of the squares is itself a perfect square, so the hypotenuse is the whole number 5, and the area and perimeter come out as 6 and 12 with no decimals attached. That exactness is rare — it happens only for the triples listed further down this page.
Scale the same triangle and the shape is untouched: legs of 6 and 8 return 10, legs of 30 and 40 return 50, and both keep the angles at 36.9° and 53.1°.
Worked Example: A Leg From the Hypotenuse
Switch to "Find a leg (know leg + hypotenuse)", type the known leg of 6 first and the hypotenuse of 10 second, then press Calculate.
Hypotenuse squared 10² = 100 Known leg squared 6² = 36 Difference 100 − 36 = 64 Missing leg √64 = 8 Area (6 × 8) ÷ 2 = 24 Perimeter 6 + 8 + 10 = 24 Acute angles arctan(6 ÷ 8) = 36.9°, and 53.1°
- What the result panel returns in leg mode
- 8 | missing leg = √(10² − 6²) = √64 | Right triangle: legs 6 and 8, hypotenuse 10 · area 24 · perimeter 24 | Acute angles: 36.9° and 53.1° — and 3-4-5 style triples make it exact
Reverse the two entries — 10 first, 6 second — and no answer appears at all. The tool reads the second box as the hypotenuse, finds it smaller than the first, and returns the amber notice instead of a negative number under a square root sign.
A few more leg-mode runs, each returning a whole number: leg 20 with hypotenuse 25 gives 15, leg 8 with hypotenuse 17 gives 15, leg 40 with hypotenuse 41 gives 9, and leg 60 with hypotenuse 61 gives 11.
When the Answer Is Not a Whole Number
Most pairs of sides do not produce a tidy result. Legs of 1 and 1 return 1.4142, which is √2 rounded to four decimals — an irrational number with no exact decimal form at any length. The panel's second line keeps the exact version, printing "c = √(1² + 1²) = √2", so the value you need for an algebra answer sits next to the value you need for a tape measure.
That second line is also where a surd gets simplified. Pull the largest square factor out of the number under the root and the exact form drops out:
| Legs entered | Panel's second line | Exact form | Readout |
|---|---|---|---|
| 1 and 1 | √2 | √2 | 1.4142 |
| 3 and 3 | √18 | 3√2 | 4.2426 |
| 2 and 4 | √20 | 2√5 | 4.4721 |
| 2 and 6 | √40 | 2√10 | 6.3246 |
| 4 and 8 | √80 | 4√5 | 8.9443 |
| 5 and 10 | √125 | 5√5 | 11.1803 |
| 6 and 12 | √180 | 6√5 | 13.4164 |
Four of those rows have legs in a 1-to-2 ratio — 2 and 4, 4 and 8, 5 and 10, 6 and 12 — which is why √20, √80, √125 and √180 all reduce to a multiple of √5. Check any line by multiplying out: 6 × √5 is 13.4164, the same figure the readout gives for legs of 6 and 12.
Pythagorean Theorem Examples From Real Measurements
Every example below is a right triangle wearing a job title. The measurements go in as plain numbers and come back the same way, so the unit is whatever you were already working in.
A Ladder Against a Wall
The ladder is the hypotenuse, the distance from the wall to its feet is one leg, and the height it reaches is the other. Take a 20-foot ladder with its feet 5 feet out from the wall: switch to leg mode, enter 5 then 20, and the readout gives 19.3649 feet of reach above the line "missing leg = √(20² − 5²) = √375".
A 24-foot ladder set 6 feet out reaches 23.2379 feet. Both runs report the same pair of acute angles, 14.5° and 75.5°, because 6 out of 24 is the same ratio as 5 out of 20 — the second ladder is the first one scaled by 1.2, and scaling never changes an angle.
Reach is not the same as usable height. The figure the calculator returns is where the top of the ladder touches the wall, and the last few rungs of any ladder are not standing room.
Television and Monitor Diagonals
A screen size is a hypotenuse. The "55-inch" on the box is the corner-to-corner diagonal of the panel, and the width and height that actually have to fit your wall are the two legs.
For a 16:9 screen the sides are in the ratio 16 to 9, so a diagonal d satisfies d² = (16k)² + (9k)² = 337k². Rearranged, each side of the panel is a fixed fraction of the number on the box:
16:9 screen, diagonal d width = d × 16 ÷ √337 = d × 0.8716 height = d × 9 ÷ √337 = d × 0.4903 √337 = 18.3576
| Advertised size | Width (in) | Height (in) | Diagonal the tool returns |
|---|---|---|---|
| 24-inch | 20.92 | 11.77 | 24.0037 |
| 27-inch | 23.53 | 13.24 | 26.9992 |
| 32-inch | 27.89 | 15.69 | 32.0004 |
| 43-inch | 37.48 | 21.08 | 43.0014 |
| 50-inch | 43.58 | 24.51 | 49.9996 |
| 55-inch | 47.94 | 26.96 | 55.0008 |
| 65-inch | 56.65 | 31.87 | 64.9994 |
| 75-inch | 65.37 | 36.77 | 75.0018 |
| 85-inch | 74.08 | 41.67 | 84.9955 |
Each diagonal lands a few thousandths off its label only because the widths and heights above are rounded to two decimals. Every row also returns the same acute angles, 60.6° and 29.4°, since all 16:9 panels are one shape at different sizes.
For ratios other than 16:9 — a 21:9 ultrawide monitor, or the 4:3 of an older display — work the width and height out first with the Aspect Ratio Calculator.
One number the table cannot give you is the bezel. Manufacturers quote the panel diagonal, and the cabinet around it adds width and height that no formula predicts — measure the product listing, not the marketing figure, before cutting a recess.
Rafters, Stair Stringers and Room Diagonals
Rise and run are legs; the sloping piece of timber laid across them is a hypotenuse. Each row below is one run of this calculator in hypotenuse mode.
| What is being measured | Two known sides | Result |
|---|---|---|
| One stair tread and riser | 7.5 in rise, 10 in run | 12.5 in of stringer |
| A 14-step flight | 105 in rise, 140 in run | 175 in of stringer |
| A steeper 14-step flight | 105 in rise, 132 in run | 168.6683 in |
| A rafter on a 6-in-12 roof | 6 ft rise, 12 ft run | 13.4164 ft |
| Diagonal of a 12 × 16 room | 12 ft and 16 ft | 20 ft |
| Diagonal of a 10 × 14 deck | 10 ft and 14 ft | 17.2047 ft |
| Guy wire, pole top to anchor | 30 ft pole, 12 ft out | 32.311 ft |
Two of those rows are triples in disguise. A 7.5-inch rise on a 10-inch run is a 3-4-5 triangle multiplied by 2.5, which is why the stringer length comes out at exactly 12.5, and the 105-by-140 flight is the same shape multiplied by 35, giving exactly 175. Both runs also report the 3-4-5 angles, 36.9° and 53.1°.
Timber lengths need more than the hypotenuse. A rafter wants its overhang and its birdsmouth cut added or subtracted, and a stringer's usable length depends on how it meets the floor — the calculator gives the geometric line between two points, which is the starting figure and not the cut list.
The Distance Between Two Points
MathWorld puts it plainly: in the plane, the distance between two points is given by the Pythagorean theorem. The horizontal gap is one leg, the vertical gap is the other, and the straight-line distance is the hypotenuse. Going from (2, 3) to (10, 9) means 8 across and 6 up, so entering 8 and 6 returns 10.
Negative coordinates make no difference once the gaps are taken, because a gap is a distance and never negative. From (−3, −1) to (4, 5) the horizontal gap is 7 and the vertical gap is 6, and entering those returns 9.2195 — the decimal form of √85.
Note that this calculator has no coordinate boxes: subtract the pairs yourself and enter the two differences. To type four coordinates straight in, or to work between latitude and longitude instead, use the Distance Calculator.
That subtraction is what makes the theorem the backbone of coordinate geometry. Distance, the length of a vector, and the radius in the equation of a circle are all this one calculation with different names on it.
A Box Diagonal Takes Two Runs
The longest object that fits inside a rectangular room or crate runs corner to opposite corner in three dimensions, and this calculator handles two at a time. Do it in two passes: first the floor diagonal from length and width, then that answer against the height.
Room 12 × 16 × 8 pass 1 legs 12 and 16 → 20 pass 2 legs 20 and 8 → 21.5407
The second pass is legitimate because the floor diagonal and the vertical edge meet at a right angle, so the pair forms its own right triangle standing on that diagonal. Feed 20 and 8 into the tool and the readout is 21.5407, above the line "c = √(20² + 8²) = √464".
Some boxes come out exact. A 3 × 4 × 12 crate gives 5 on the first pass and then 13 on the second, both whole numbers, because 3-4-5 and 5-12-13 are both triples and they chain.
Pythagorean Theorem Chart: Triples and Common Results
A Pythagorean triple is three whole numbers that satisfy the equation exactly, so the square root at the end lands on an integer instead of a decimal. MathWorld records the smallest and best known as 3, 4, 5.
Every Primitive Triple With a Hypotenuse Under 100
Primitive means the three numbers share no common factor, so the triple is not merely a larger copy of a smaller one. Sixteen of them have a hypotenuse of 100 or less, and every figure below comes from running that triple through this calculator with the shorter leg entered first.
| Triple | Acute angles | Area | Perimeter |
|---|---|---|---|
| 3, 4, 5 | 36.9° and 53.1° | 6 | 12 |
| 5, 12, 13 | 22.6° and 67.4° | 30 | 30 |
| 7, 24, 25 | 16.3° and 73.7° | 84 | 56 |
| 8, 15, 17 | 28.1° and 61.9° | 60 | 40 |
| 9, 40, 41 | 12.7° and 77.3° | 180 | 90 |
| 11, 60, 61 | 10.4° and 79.6° | 330 | 132 |
| 12, 35, 37 | 18.9° and 71.1° | 210 | 84 |
| 13, 84, 85 | 8.8° and 81.2° | 546 | 182 |
| 16, 63, 65 | 14.3° and 75.7° | 504 | 144 |
| 20, 21, 29 | 43.6° and 46.4° | 210 | 70 |
| 28, 45, 53 | 31.9° and 58.1° | 630 | 126 |
| 33, 56, 65 | 30.5° and 59.5° | 924 | 154 |
| 36, 77, 85 | 25.1° and 64.9° | 1386 | 198 |
| 39, 80, 89 | 26.0° and 64.0° | 1560 | 208 |
| 48, 55, 73 | 41.1° and 48.9° | 1320 | 176 |
| 65, 72, 97 | 42.1° and 47.9° | 2340 | 234 |
The list hides a rule worth knowing. MathWorld notes that in every Pythagorean triple one side is divisible by 3, another by 4, and another by 5 — sometimes a single side covers two of those, as in 8-15-17, 7-24-25 and 20-21-29, and in 11-60-61 the side 60 covers all three. It follows that the product of the two legs is always divisible by 12 and the product of all three sides by 60, which is a quick way to reject a mistyped "triple" before trusting it. One further pattern is easy to miss: in two triples the area and the perimeter come out as the same number, and a short rearrangement shows why there cannot be a third.
Area equal to perimeter (a × b) ÷ 2 = a + b + c with c = √(a² + b²) rearranges to (a − 4)(b − 4) = 8 8 = 1 × 8 or 2 × 4, so a − 4 is 1, 2, 4 or 8
One row in the table has its area and its perimeter equal: 5-12-13 gives 30 and 30. Only one other right triangle with whole-number sides does the same, and it is 6-8-10 — the doubled 3-4-5, not primitive, so not listed above — which gives 24 and 24. The algebra shows why there is no third: four factor pairs exist, and they produce those same two triangles twice over.
Scaling a Triple: the 3-4-5 Family
Multiply every side of a triple by the same number and the result is still a triple. The 3-4-5 family is the one that reaches building sites:
| Legs entered | Hypotenuse | Area | Perimeter |
|---|---|---|---|
| 0.75 and 1 | 1.25 | 0.375 | 3 |
| 3 and 4 | 5 | 6 | 12 |
| 6 and 8 | 10 | 24 | 24 |
| 9 and 12 | 15 | 54 | 36 |
| 12 and 16 | 20 | 96 | 48 |
| 15 and 20 | 25 | 150 | 60 |
| 30 and 40 | 50 | 600 | 120 |
| 300 and 400 | 500 | 60000 | 1200 |
Every row returns the same two angles, 36.9° and 53.1°, because scaling changes the size of a triangle and not its shape. The other two columns scale differently, and the table shows it: tripling the sides multiplies the perimeter by 3, from 12 to 36, but the area by 9, from 6 to 54. Multiply the sides by 100 and the perimeter goes from 12 to 1200 while the area goes from 6 to 60,000.
For squaring a corner, the larger member of the family is the better tool. Marking 3 feet along one edge and 4 along the other puts a quarter-inch error into a 5-foot diagonal; marking 6 and 8 and checking for 10 spreads the same quarter inch over twice the distance, so it represents half the angular error.
Where Triples Come From: Two Whole Numbers
Triples are not found by trial and error. MathWorld records the Greek construction: take two whole numbers m and n with m the larger, sharing no common factor, one of them even and the other odd, and the three expressions below are always a primitive triple.
Pick m > n, coprime, opposite parity first side m² − n² second side 2 × m × n hypotenuse m² + n²
| m | n | m² − n² | 2mn | m² + n² | Triple |
|---|---|---|---|---|---|
| 2 | 1 | 3 | 4 | 5 | 3, 4, 5 |
| 3 | 2 | 5 | 12 | 13 | 5, 12, 13 |
| 4 | 1 | 15 | 8 | 17 | 8, 15, 17 |
| 4 | 3 | 7 | 24 | 25 | 7, 24, 25 |
| 5 | 2 | 21 | 20 | 29 | 20, 21, 29 |
| 5 | 4 | 9 | 40 | 41 | 9, 40, 41 |
| 6 | 1 | 35 | 12 | 37 | 12, 35, 37 |
| 6 | 5 | 11 | 60 | 61 | 11, 60, 61 |
| 7 | 2 | 45 | 28 | 53 | 28, 45, 53 |
Watch the third and fourth columns rather than assuming an order. With m = 4 and n = 1 the expression m² − n² gives 15 while 2mn gives 8, so the smaller leg is the second one — the construction produces both legs but does not sort them. Either order gives the same hypotenuse in the calculator; only the order of the two reported angles changes.
Every triple in the previous table can be produced this way, and the construction never runs out, which is the short answer to whether the list of triples ends. It does not.
Hypotenuses That Are Square Roots
Away from the triples, the answer is a decimal that never terminates. These are the pairs that turn up most often in homework, with the exact value alongside the readout:
| Legs | Under the root | Exact | Readout |
|---|---|---|---|
| 1 and 1 | √2 | √2 | 1.4142 |
| 1 and 2 | √5 | √5 | 2.2361 |
| 2 and 2 | √8 | 2√2 | 2.8284 |
| 1 and 3 | √10 | √10 | 3.1623 |
| 2 and 3 | √13 | √13 | 3.6056 |
| 3 and 3 | √18 | 3√2 | 4.2426 |
| 1 and 4 | √17 | √17 | 4.1231 |
| 5 and 5 | √50 | 5√2 | 7.0711 |
| 10 and 10 | √200 | 10√2 | 14.1421 |
Five of those rows have equal legs, and they all follow one pattern: when a = b the equation collapses to c = a√2, so the hypotenuse is the leg times 1.41421. Legs of 5 return 7.0711 and legs of 10 return 14.1421 — each one is its leg multiplied by √2, then rounded to four places.
That is the 45-45-90 triangle, and its second fixed cousin — a short leg, a long leg of short × √3, and a hypotenuse of exactly twice the short leg — is worked out on the 30-60-90 Triangle Calculator.
The 30-60-90 shape can be checked here too. Put the tool in leg mode, enter a short leg of 1 and a hypotenuse of 2, and it returns 1.7321 with angles of 30.0° and 60.0° — √3 to four decimals.
How to Read Your Result
One large readout and three breakdown rows, in the same order on every run. Each row is split at its first colon or equals sign, with the words on the left becoming a label and everything after it the value.
The Four Lines the Panel Returns
For legs of 3 and 4, the panel carries exactly this, top to bottom:
- 5 — the missing side, on its own, in the large readout. This is the number you came for.
- c = √(3² + 4²) = √25 — the arithmetic, with your own figures substituted in and the exact value under the root preserved.
- Right triangle: legs 3 and 4, hypotenuse 5 · area 6 · perimeter 12 — all three sides restated in order, then the two quantities that follow from them.
- Acute angles: 36.9° and 53.1° — and 3-4-5 style triples make it exact — the two non-right angles, which always add to 90°.
In leg mode the second line changes shape, reading "missing leg = √(10² − 6²) = √64" rather than starting with c, and the third line lists the leg you entered before the one the tool worked out. Everything else keeps its position. A "Copy result" button sits inside the panel below the three rows and appears only once a calculation has succeeded; it copies the readout and the rows as text, with each row's label joined to its value rather than separated as it is on screen.
The closing phrase on the fourth line is fixed text that appears on every calculation. It is a remark about triples in general, not a verdict on the numbers you typed, so seeing it does not mean your triangle is one.
Which Angle Belongs to Which Side
The two angles are printed in a fixed order: the first is the angle opposite the side you typed into the first box. Enter 48 and then 27 and the line reads "Acute angles: 60.6° and 29.4°"; enter the same triangle as 27 and then 48 and it reads "Acute angles: 29.4° and 60.6°". The triangle is identical, the hypotenuse is 55.0727 either way, and only the reading order has moved.
Leg mode follows the same rule using the leg you supplied. A leg of 12 against a hypotenuse of 13 gives "Acute angles: 67.4° and 22.6°", the larger angle first because 12 is the longer of the two legs; the same triangle built forward from legs of 5 and 12 gives "22.6° and 67.4°".
Both numbers carry one decimal place, and the second is worked out as 90 minus the first, so the pair on screen adds back to 90.0. The angle opposite the longer leg is always the larger of the two, which is the quickest way to tell which is which without re-reading your entries.
Rounding: Four Decimals on Sides, One on Angles
Sides, area and perimeter are rounded to four decimal places with trailing zeros dropped, which is why a hypotenuse of 5 prints as "5" and not "5.0000", while legs of 1 and 1 give "1.4142". Angles always carry one decimal, so a half-square triangle reports "45.0°" rather than "45°".
The value under the root sign is rounded as well, and at ordinary sizes that is invisible. It shows up only on very small numbers: legs of 0.004 and 0.005 return a correct hypotenuse of 0.0064, but the line above it reads "c = √(0.004² + 0.005²) = √0", because the true sum of 0.000041 rounds away at four decimal places.
The fix is to work in a smaller unit. A 3-4-5 triangle entered in meters as 3 and 4 returns 5 above "√25"; the same triangle entered in millimeters as 3000 and 4000 returns 5000 above "√25000000", and every intermediate figure stays readable.
The Two Messages That Replace an Answer
When a calculation cannot proceed, an amber "Check your inputs" notice appears in place of the readout, carrying one of two sentences:
- "Enter both known sides" — one of the boxes is blank, or holds zero, a negative number, or something the field cannot read as a number.
- "The hypotenuse must be the longest side — enter leg first, then hypotenuse" — leg mode, where the second entry is not larger than the first. Equal values trigger it too, since a triangle whose leg matches its hypotenuse has no third side.
Neither message reports a fault. The first refuses a triangle with a side of zero or less, and the second refuses one whose sides contradict the theorem, both of which would otherwise end in the square root of a negative number.
The cure for the second message is nearly always the order of entry rather than the measurements. Put the shorter figure in the first box, the longer in the second, and press Calculate again.
Limits: When This Calculator Does Not Apply
The theorem is narrow by design, and so is the tool built on it. These are the situations where it gives you nothing, or gives you something you should not use:
- No right angle, no theorem. An oblique triangle needs the law of cosines, c² = a² + b² − 2ab·cos C, which reduces to a² + b² = c² only when C is 90° and its cosine is zero. Euclid states the two failure cases geometrically in Elements II.12 and II.13.
- The right angle is assumed, never checked. Enter two sides of a corner that is three degrees out of square and you still get a confident hypotenuse. Verify the corner with the converse test before trusting the number.
- Flat surfaces only. Distances across a curved surface — a great-circle route between two cities, for instance — are not hypotenuses, and this calculation will understate them.
- Two sides, or nothing. There is no way to enter an angle and one side; that is trigonometry rather than this theorem, and it needs a sine or a cosine instead of a square root.
- No units and no unit conversion. Both boxes take bare numbers, so entering 6 feet and 30 inches produces a meaningless answer. Convert to a common unit first.
- One triangle per run. A three-dimensional diagonal, a chain of rafters, or a polygon perimeter each need several passes, with the intermediate answers carried forward by hand.
- Precision runs out below about a hundredth of a unit, as the rounding section above shows. Values that small are better re-entered in a smaller unit.
- The arithmetic runs in your browser, but the page around it carries analytics and advertising scripts like any other page on the web — the calculation is local, the visit is not.
When the angles are the known quantity rather than the sides, the two standard triangles have their own pages, starting with the 30-60-90 Triangle Calculator.
Inside those limits it is exact and unarguable, which is rarer than it sounds. Given two sides of a genuine right triangle there is one possible third side, one area, one perimeter and one pair of angles, with no assumption, average or estimate anywhere in the chain.