gizmobench

Right Triangle Calculator

Type any two values of a right triangle into any of the five boxes, the legs a and b, the hypotenuse c, or one of the acute angles A and B, and the other three arrive with the area, the perimeter and the altitude to the hypotenuse. There is no menu asking which pair you know first: the tool works out which two you filled in and solves from those. The figure redraws to scale as you type, so a 5 and a 12 really do look like a 5 and a 12, and every angle can be read in degrees or radians. Three sides of any triangle, right or not, go on the side-side-side page, and two angles of any triangle go on the angle sum page.

a = 5b = 12c = 13ABC
Solveda and b given
a
5
leg opposite A
b
12
leg opposite B
c
13
hypotenuse
A
22.6199°
opposite a
B
67.3801°
opposite b
C
90°
the right angle
area
30
half of a times b
perimeter
30
a + b + c
altitude
4.61538
to the hypotenuse
Known
a
b
c
A (°)
B (°)
Angles in

Fill any two of the five boxes: the legs a and b, the hypotenuse c, or one of the acute angles A and B. The other three, the area, the perimeter and the altitude follow. Angle C is the right angle.

  • Three sides8, 15, 17
    right angled · 28.0725° and 61.9275° · area 60
  • Leg and anglea = 10, A = 30°
    b = 17.3205, c = 20 · area 86.6025
  • Angle sumone acute angle is 34°
    90° + 34° + 56° = 180°
How the three modes work. A right triangle has five values: the legs a and b, the hypotenuse c, and the acute angles A and B, with C fixed at a right angle. Any two of them fix the triangle, so two boxes are what the tool asks for: sides come from Pythagoras, angles from the inverse sine, cosine and tangent, and the altitude is the perpendicular dropped onto the hypotenuse, a times b over c. Two angles are refused, because they set the shape and not the size. Three sides go to the law of cosines instead, which works on any triangle and says whether it is right, acute or obtuse, with the area from Heron’s formula. Two angles of any triangle give the third from the 180 degree sum. Exact trigonometry to the precision of the numbers you enter, with every side and angle shown in degrees or radians. It cannot know your units or your measurement error, and it is geometry only, not a structural calculation.

Common questions

Which two values are enough to solve a right triangle?
Any two except two angles. Two legs: 3 and 4 give a hypotenuse of exactly 5. A leg and the hypotenuse: 5 and 13 give the other leg as exactly 12. A leg and an acute angle: a = 1 with A = 30 degrees gives a hypotenuse of exactly 2. The hypotenuse and an angle: c = 20 with A = 30 gives a = 10. Two angles are refused, and the tool says why: A and B set the shape of the triangle but not its size, so every triangle with those angles would be a correct answer. Fill a third box and it asks you to clear one instead of quietly ignoring it, because three values can disagree with each other.
What is the altitude the tool shows?
The perpendicular dropped from the right angle onto the hypotenuse, which is the height of the triangle when the hypotenuse is the base. It is the product of the two legs divided by the hypotenuse, so a 3-4-5 triangle has an altitude of exactly 2.4. It is the number you want when a right triangle is a gusset, a gable or a sail and you need the clearance from the corner to the long side. The area row uses the legs instead, half of a times b, which is the same area by a shorter route.
Can I work in radians instead of degrees?
Yes, and switching does not change your triangle. The Angles in control flips between degrees and radians, and the numbers already in the angle boxes are rewritten as it goes, so 30 becomes 0.523598775598 and back again. A right angle is 90 degrees or 1.5708 radians, and the three angles of a triangle add to 180 degrees or pi radians. The label on each angle box changes with the unit, so a box asking for radians never gets read as degrees.
How is the side-side-side page different?
It drops the right angle. The right triangle mode assumes angle C is 90 degrees and uses Pythagoras and the inverse sine, cosine and tangent. The side-side-side page takes all three sides of any triangle and uses the law of cosines for the three angles and Heron's formula for the area, then says whether the triangle is right, acute or obtuse from its largest angle. Three sides that cannot meet, like 1, 2 and 10, are named as such rather than answered: any two sides of a triangle must add to more than the third. Three that add up exactly, like 1, 2 and 3, lie flat in a straight line and have no area.
Does it handle a triangle that is not right angled?
On two of its three modes, yes. Three sides solves any triangle by the law of cosines, and the angle sum takes any two angles and gives the third. What the tool does not do is solve a general triangle from a mixture of sides and angles, the side-angle-side and angle-side-angle cases: those need the law of sines and are not built here. The right triangle mode is exactly what its name says, a triangle with one 90 degree corner, and it will refuse an acute angle of 90 or more rather than pretend otherwise.
Is anything uploaded, and are my numbers kept?
Nothing is uploaded. The trigonometry runs in your browser, and the page makes no request while you type. The numbers in the boxes, the mode and the angle unit are remembered in this browser alone so the page opens where you left it, and clearing your site data removes them. The figures on the stage are rounded for reading, six significant figures for a length and four decimal places for an angle in degrees, and the Copy button gives you those same figures; the arithmetic behind them is full double precision.

Exact trigonometry to the precision of the numbers you enter, with every side and angle shown in degrees or radians. It cannot know your units or your measurement error, and it is geometry only, not a structural calculation.