Right Triangle Calculator
Give a right triangle its two legs and everything else about it is determined. Enter the legs, and this calculator returns the hypotenuse, both acute angles, the area and the perimeter.
Pythagoras First, Then the Angles Open
A right triangle is the most determined figure in geometry: fix the two legs and the hypotenuse follows by the theorem that bears Pythagoras' name — c = √(a² + b²) — the angles follow by inverse trigonometry (the angle facing a leg is the arctangent of that leg over its neighbour), and area and perimeter are bookkeeping: ab ÷ 2 and a + b + c. The calculator runs the whole solution in one pass and labels its angles by opposition, the convention that survives swapping the inputs. Its importance is out of all proportion to its simplicity: the right triangle is the atom of surveying (every distance ever taped across a field is its hypotenuse), of trigonometry (sine and cosine are its ratios before they are anything else), and of the carpenter's square, the navigator's fix and the physicist's vector — each decomposed, sooner or later, into this figure's legs. A page that solves it instantly, with the angle bookkeeping stated honestly, is infrastructure. It is also, not incidentally, the verifier for this hub's trigonometry at large: every sine and cosine ever tabulated is a ratio inside some right triangle this page can solve, so a suspicious trig value can always be brought here and confronted with its legs — the figure is the court of first appeal for the entire subject, and its docket never closes.
Worked Example: The Immortal 3-4-5
The defaults are the most famous numbers in geometry: legs 3 and 4 give hypotenuse 5 exactly (9 + 16 = 25), angles 36.87° (opposite the 3) and 53.13° (opposite the 4), area 6, perimeter 12. The triple was old when Pythagoras was young — Egyptian rope-stretchers knotted 3-4-5 cords to raise true right angles for field boundaries after the Nile flood, and Babylonian tablets list such triples a millennium earlier still. Its multiples tile the practical world (6-8-10 for the builder's layout, 5-12-13 for the next size up), and its angles are the ones machinists meet in the 3-4-5 blocks of the inspection bench. Run the calculator on any suspected triple and the hypotenuse's cleanness reports the verdict: integer in, integer out, or the triangle is not what the rope promised. Builders exploit exactly this on site: to square a foundation, they measure 3 along one string and 4 along the other and adjust until the diagonal reads 5 — the theorem turned into a spirit level, with this page as its pocket form.
The 45-45-90 and 30-60-90 Specials
Two right triangles carry their solutions in their names: the isosceles (legs equal) has angles 45°-45°-90° and hypotenuse leg × √2 ≈ 1.4142 — the diagonal of every square, appearing wherever things are squared off — and the 30-60-90, half of an equilateral triangle, has sides in the ratio 1 : √3 : 2, the short leg half the hypotenuse exactly. Both are worth recognising on sight in the calculator's output (enter 1 and 1; enter 1 and 1.7320508) because they are the triangles examinations set and workshops use as gauges — a 30-60-90 set square is on drafting benches for a reason. The general solver above handles all comers; the specials are its famous citizens, and a reader fluent in both the formula and the two celebrities owns the topic entire.
The Ladder Problem and the Diagonal Screen
Two consumer encounters keep Pythagoras employed: the ladder — its foot b metres from the wall, its top reaching √(L² − b²) up it, the safety literature's 4-to-1 slope rule being a right triangle with angles 75.96° prescribed in advance — and the television, whose advertised inches are this calculator's hypotenuse across a 16:9 pair of legs (a 55-inch screen is 121.8 cm wide by 68.5 high, a fact buyers discover when the cabinet does not fit). Both encounters share the pattern of all applied right triangles: two quantities are easy to take (the ladder's length and its foot's distance, the screen's diagonal as marketed) and the third, the one that decides, must be computed. The page is the computation, priced in the time it takes to type two legs.
Related Tools
More from the Math Calculators hub: the Triangle Area Calculator — any triangle's area, by base-height or by Heron's formula — and the Circumference Calculator, for the circle this triangle's hypotenuse so often diameters.
Frequently Asked Questions
What if I know the hypotenuse and one leg?
Rearrange Pythagoras: the missing leg is √(c² − known²) — enter that leg and the known leg into this page's two fields and the full solution opens (the calculator takes legs as its input because every right-triangle problem reduces to them in one step). Guard the subtraction: the hypotenuse must exceed either leg, and a "solution" whose radicand comes out negative is the data announcing an impossible triangle — c is by definition the longest side, and geometry declines to proceed when told otherwise.
What if I know one leg and one angle?
Trigonometry's front door: the other leg is the known one times the tangent (or divided by it, by which angle you hold), and the hypotenuse is the known leg divided by the sine or cosine of the facing angle. Compute the second leg by those ratios and bring the pair here for the complete solution — angles summing to 90°, area, perimeter — with the page's angle labels confirming you faced the ratios the right way. Surveyors live in this direction of the problem (a taped baseline, an observed angle, an untouchable distance), and the two-step through this calculator is their field arithmetic.
Why do the angles always sum to 90 degrees?
Because every triangle's angles sum to 180°, and the right angle has already spent 90 of them — the two acute angles are complementary, a fact the calculator's output demonstrates on every run (36.87 + 53.13 = 90.00) and that anchors the co-function identities of trigonometry (sine of an angle equals cosine of its complement — the reason 'co' is in cosine at all). When a purported solution's acute angles fail the sum, the triangle or the transcription is wrong; it is the fastest audit in the subject.
What is the hypotenuse, geometrically, beyond the longest side?
It is also the diameter of the triangle's circumcircle — Thales' theorem: the right angle sits on the circle whose diameter is the hypotenuse, whose centre is the hypotenuse's midpoint, equidistant from all three vertices. The fact turns this page into a circle instrument (a right triangle's hypotenuse is measurable as a diameter, its midpoint a centre) and explains the semicircle area items elsewhere in the hub. Enter legs here, take the hypotenuse there — the two pages are one figure read in two dialects.
Who proved the theorem first?
The relation was used in Babylon and Egypt a millennium before Pythagoras (the tablet Plimpton 322 lists triples by 1800 BC), stated as a general theorem in China's Zhoubi and India's Sulba Sutras, and first proved, in the Western line, in Euclid's Elements (I.47 — the "windmill" diagram) whoever among the early Greeks deserves the credit tradition assigns to Pythagoras. The calculator computes the theorem's arithmetic; the priority dispute is recorded here because a fact this old belongs to everyone, and its name is a historical accident the whole species has agreed to keep.
What are the trigonometric ratios, in this triangle's terms?
For the angle facing leg a: sine is a ÷ hypotenuse (opposite over hypotenuse), cosine is b ÷ hypotenuse (adjacent over hypotenuse), tangent is a ÷ b (opposite over adjacent) — the SOH-CAH-TOA of every classroom, read directly off this page's output (the worked example: sin 36.87° = 3/5 = 0.6 exactly). The calculator does not print the ratios because its angles already contain them (any angle's ratios are one keypress of mathematics away), but the reader should see that the whole of trigonometry is this triangle's three divisions, generalised; the page is the ratios' home address, and every trig table ever printed is its census.
How do I check a roof pitch or a ramp's slope?
A pitch is a right triangle's rise over run (a 6-in-12 roof has legs 6 and 12 per foot of span — hypotenuse √(36 + 144) = 13.42, angle 26.57°, both from this page), and accessibility ramps are legislated in the same language (a 1-in-12 slope's angle is 4.76°, its ramp length the hypotenuse of the entrance's height). Builders quote the ratio, inspectors check the angle, and the calculator translates between the dialects on two fields — one more profession where the legs arrive as a code for the hypotenuse nobody can stretch a tape across directly.
How are right triangles used in navigation and GPS?
By decomposition: any course is split into north and east legs (the triangle again), distances run through the hypotenuse, and bearings are its angles — dead reckoning is this page iterated. Satellite positioning replaces the plane triangle with its spherical and relativistic descendants, but the receiver's local solution still flattens to right triangles at the end (east-north-up coordinates are legs by another name). The figure is not a school topic that surveying borrowed; it is the permanent shape of "how far, in which direction," and the calculator solves it in the form every one of those professions reconverges on.