A right triangle is completely fixed by any two measurements, as long as at least one of them is a side. With two sides the solver uses the Pythagorean theorem; with a side and an angle it uses sine, cosine or tangent. It then gives both acute angles, the area, the perimeter, the altitude to the hypotenuse, the inradius and the circumradius.
How to use the right triangle solver
- Label the triangle. The right angle is C. Side a is across from angle A, side b is across from angle B, and the hypotenuse c is across from the right angle. See parts of a right triangle if the names are new.
- Enter two values. Any pair works except two angles: two sides, or one side and one acute angle.
- Read the results. The three boxes you left empty fill in, and the panel lists the area, perimeter, altitude and both radii, with the formulas and working underneath.
The page address updates as you go, which makes any triangle easy to share, as in this link with a = 5 and c = 13.
The formulas the solver uses
These are the formulas the solver applies for each pair of inputs:
| You know | Sides | Angles |
|---|---|---|
| Both legs a, b | c = √a2 + b2 | A = arctana over b, B = 90° − A |
| Hypotenuse c and leg a | b = √c2 − a2 | A = arcsina over c, B = 90° − A |
| Hypotenuse c and angle A | a = csinA, b = ccosA | B = 90° − A |
| Leg a and the angle opposite it, A | c = a over sinA, b = a over tanA | B = 90° − A |
| Leg a and the angle next to it, B | c = a over cosB, b = atanB | A = 90° − B |
The rows for leg b or angle B are the same with the letters swapped. The two acute angles always add up to 90°, because a triangle's angles total 180°. For choosing a method on paper, see Pythagorean theorem or trigonometry?
Area, perimeter, altitude, inradius and circumradius
- Area = 1 over 2ab. The legs are perpendicular, so one is the base and the other is the height.
- Perimeter = a + b + c.
- Altitude to the hypotenuse, h = ab over c. Work out the area twice: 1 over 2ab using a leg as the base, and 1 over 2ch using the hypotenuse. Setting them equal gives h = ab/c. More on the height of a triangle page, and the geometric mean theorem explains how this altitude splits the hypotenuse.
- Inradius, r = a + b − c over 2, the radius of the largest circle that fits inside. The circle touches each leg at a distance r from C, and the two tangents from A are equal, as are the two from B. So c = (b − r) + (a − r), which rearranges to the formula. An equivalent version is r = ab over a + b + c.
- Circumradius, R = c over 2. The circle through all three corners has the hypotenuse as a diameter, so its center is the midpoint of the hypotenuse. This is the converse of Thales' theorem: an angle inscribed in a semicircle is a right angle.
Worked examples
Example 1: two legs
Solve the right triangle with a = 3 and b = 4.
c= √32 + 42 = 5A= arctan3 over 4 ≈ 36.87°B= 90° − A ≈ 53.13°Area 6, perimeter 12, altitude h = 12 over 5 = 2.4, inradius r = 3 + 4 − 5 over 2 = 1, circumradius R = 2.5.
Example 2: the hypotenuse and an angle
Solve the triangle with c = 12 and A = 30° (the default example above).
a= 12sin30° = 6b= 12cos30° = 6√3 ≈ 10.39B= 90° − 30° = 60°Area 18√3 ≈ 31.18, perimeter 18 + 6√3 ≈ 28.39, altitude 3√3 ≈ 5.20, inradius 3√3 − 3 ≈ 2.20, circumradius 6. This is a 30-60-90 triangle.
Example 3: a leg and the angle next to it
Leg b = 10 and angle A = 25°. Angle A touches leg b, so b is adjacent to A and a is opposite it.
a= 10tan25° ≈ 4.66c= 10 over cos25° ≈ 11.03B= 90° − 25° = 65°Check with the theorem: 4.66312 + 102 ≈ 121.74 and 11.03382 ≈ 121.74.
Example 4: the hypotenuse and a leg
Leg a = 5 and hypotenuse c = 13.
b= √132 − 52 = √144 = 12A= arcsin5 over 13 ≈ 22.62°B≈ 67.38°Area 30, perimeter 30, altitude 60 over 13 ≈ 4.62, inradius 2, circumradius 6.5.
Right triangle angle calculator: angles from two sides
To find an angle from two sides, use an inverse trig function. All three give the same angle; pick the one that uses the sides you know:
A = arctana over b = arcsina over c = arccosb over c| Sides a, b, c | Angle A | Angle B |
|---|---|---|
| 3, 4, 5 | 36.87° | 53.13° |
| 5, 12, 13 | 22.62° | 67.38° |
| 8, 15, 17 | 28.07° | 61.93° |
| 7, 24, 25 | 16.26° | 73.74° |
| 20, 21, 29 | 43.60° | 46.40° |
| 9, 40, 41 | 12.68° | 77.32° |
| 1, 1, √2 | 45° | 45° |
| 1, √3, 2 | 30° | 60° |
NoteNo right triangle with whole-number sides has an acute angle that is a whole number of degrees. Whole-number sides make sinA = a/c a fraction, and by Niven's theorem the only whole-degree acute angle with a rational sine is 30°, whose cosine √3 over 2 is irrational. That is why the Pythagorean triples above all have decimal angles.
Why two values are enough, and two angles are not
Two angles fix the shape of a triangle but not its size: every 30-60-90 triangle has the same angles, whatever its size, so you need at least one length to set the scale.
Two sides always fix a right triangle completely. For general triangles, knowing two sides and an angle that is not between them can allow two different triangles, but when that angle is the right angle there is only one. Geometry courses call this the hypotenuse-leg (HL) congruence rule. The solver still checks that the numbers are possible: the hypotenuse must be longer than either leg, and each acute angle must be strictly between 0° and 90°.
Frequently asked questions
How do you solve a right triangle?
Start from two known values. With two sides, find the third with the Pythagorean theorem and an angle with an inverse trig function. With a side and an angle, find the other angle by subtracting from 90°, then the sides with sine, cosine or tangent.
How do I find the angles of a right triangle from its sides?
Use A = arctan(a/b), or arcsin(a/c) if you know the hypotenuse, then B = 90° − A. For a 3-4-5 triangle that gives about 36.87° and 53.13°.
Does the solver use degrees or radians?
Degrees, for both input and output. To convert an angle in radians, multiply it by 180/π; for example 0.5 radians is about 28.65°.
How is this different from the Pythagorean theorem calculator?
The Pythagorean theorem calculator works with sides only. The solver also accepts angles and returns extra measurements such as the altitude and the radii of the inscribed and circumscribed circles.
Why is the circumradius exactly half the hypotenuse?
The midpoint of the hypotenuse is the same distance from all three corners, so it is the center of the circle through them. That distance is half the hypotenuse, so R = c/2 for every right triangle.
Keep exploring
- CalculatorsPythagorean Theorem CalculatorFree Pythagorean theorem calculator. Enter any two sides of a right triangle to find the third, with step-by-step working, exact radical answers and a drawing.
- CalculatorsHypotenuse CalculatorFree hypotenuse calculator: find the longest side of a right triangle from two legs, a leg and an angle, or the area and a leg, with steps and exact radicals.
- LearnRight Triangle: Parts, Legs and HypotenuseWhat a right triangle is, the names of its parts, how to spot the hypotenuse in any position, why it is always the longest side, and area and perimeter.
- LearnPythagorean Theorem or Trigonometry: Which Should You Use?When to use the Pythagorean theorem vs trigonometry (SOH CAH TOA): a decision flowchart, side-by-side worked examples and multi-step problems that need both.
- CalculatorsSpecial Right Triangle CalculatorSolve any 30-60-90 or 45-45-90 triangle from one side. Get the other sides in exact radical form and as decimals, plus area, perimeter and steps.
- LearnFind the Height of a Triangle with the Pythagorean TheoremFind the height of an isosceles or equilateral triangle with the Pythagorean theorem: h = √(s² − (b/2)²), h = (√3/2)s, area formulas and slant heights.