Right Triangle Calculator | Sides, Angles & Area

Free Pythagorean solver

Right Triangle Calculator with Steps

Enter any two independent measurements, including at least one side. Find the missing legs, hypotenuse, acute angles, area, perimeter, altitude, projections, radii, medians and trigonometric ratios.

Last Updated: July 26, 2026
Any two valid values
Pythagorean and trig steps
Complete right-triangle measures
Responsive labeled diagram

Online Right Triangle Solver

Leg a is opposite angle A, leg b is opposite angle B, and c is the hypotenuse opposite the fixed 90-degree angle C.

Runs in your browser

Enter Known Measurements

Provide two values, with at least one side. Extra entries are checked for consistency.

Leg a opposite A

One perpendicular leg

Leg b opposite B

The other perpendicular leg

Hypotenuse c opposite 90°

Must be the longest side

Acute angle A opposite a

Greater than 0 and less than 90

Acute angle B opposite b

A + B must equal 90 degrees

Input rule: Use positive decimals, scientific notation or one simple fraction such as 7/2. Leave unknown fields blank. Do not enter commas, units or formulas.

Solved Right Triangle

Enter two measurements, then select Solve Right Triangle.

MethodNot calculated
Triangle typeNot calculated
PerimeterNot calculated
AreaNot calculated
Calculated right triangle diagram A scaled right triangle with vertices A, B and C, legs a and b, and hypotenuse c. A B C = 90° a b c
The diagram preserves the solved proportions and fits them into the panel. Use the numeric results for measurements.

Sides and opposite angles

PartLengthOpposite angleRole
Right-triangle measurements will appear here.

Altitude, radii and projections

MeasureResultFormula
Derived measurements will appear here.

Trigonometric ratios

AngleSineCosineTangent
Trigonometric ratios will appear here.

Calculation steps

  1. Enter two independent values, including at least one side.

How to Use This Right Triangle Calculator

  1. Match your measurements to the diagram. The perpendicular legs are a and b. The longest side, across from the right angle, is hypotenuse c.
  2. Enter any two independent values. Use two sides, or one side and one acute angle. At least one side is required to set the triangle's size.
  3. Leave unknown fields blank. Enter every length in the same unit and enter acute angles in degrees.
  4. Select a unit label and the number of decimal places you want to display.
  5. Select Solve Right Triangle. Review the complete measurements, formulas, diagram and calculation steps.

You may enter more than two values. The calculator treats extra values as checks instead of ignoring them. Small differences caused by normal rounding produce a notice. Larger differences produce a conflict message so an incorrect side or angle does not silently change the answer. Use Reset before starting a separate problem.

What the Right Triangle Calculator Finds

A right triangle contains one 90-degree angle and two complementary acute angles. Once two independent measurements are known, including at least one side, the remaining dimensions follow from the Pythagorean theorem and right-triangle trigonometry. The result is unique because the right angle is fixed.

The calculator returns both legs, the hypotenuse, angles A and B, perimeter, semiperimeter and area. It also finds the altitude from the right-angle vertex to the hypotenuse, the two projections created on the hypotenuse, all three medians, the inradius, the circumradius and sine, cosine and tangent for each acute angle. Length outputs use your selected label. Area uses the square of that unit.

Right Triangle Notation and Valid Inputs

This page uses standard opposite-side notation. Side a lies opposite angle A, side b lies opposite angle B, and side c lies opposite C. Because C is fixed at 90 degrees, c is always the hypotenuse and must be longer than either leg.

Known valuesMain calculationValid when
Legs a and bPythagorean theorem and arctangentBoth legs are positive
Leg a and hypotenuse cMissing-leg formula and inverse sinec is greater than a
Leg b and hypotenuse cMissing-leg formula and inverse cosinec is greater than b
One side and angle ASine, cosine or tangent0° < A < 90°
One side and angle BSine, cosine or tangent0° < B < 90°
Angles A and B onlyInsufficient for lengthsA side is still required

Two acute angles determine the shape but not the scale. A 3-4-5 triangle and a 6-8-10 triangle have identical angles yet different lengths and areas. Entering one side fixes the scale. Unlike the SSA case for a general triangle, a confirmed right triangle does not produce two different valid solutions from one side and one acute angle.

Right Triangle Formulas Used

Pythagorean Theorem

The square of the hypotenuse equals the sum of the squares of the two legs. This rule finds a missing side when two side lengths are known.

a² + b² = c²
c = √(a² + b²)
a = √(c² − b²)
b = √(c² − a²)

Acute Angles

Angle A is opposite leg a and adjacent to leg b. Angle B uses the opposite relationship. The calculator uses the two-argument arctangent when both legs are known because it remains stable across a wide range of side ratios.

A = arctan(a / b)
B = arctan(b / a)
A + B = 90°

If the hypotenuse is known, the same angles follow from A = arcsin(a/c), A = arccos(b/c), or the matching formulas for B. When one angle is entered, the other acute angle equals 90 degrees minus the entered angle.

Area and Perimeter

The perpendicular legs serve as the base and height, so no separate altitude is needed for the basic area calculation.

K = (a × b) / 2
P = a + b + c
s = P / 2

Altitude, Radii and Projections

The altitude hc runs from the right-angle vertex to the hypotenuse. It divides c into the projections of legs a and b. A right triangle's circumcenter is the midpoint of its hypotenuse.

hc = ab / c
r = ab / (a + b + c) = (a + b − c) / 2
R = c / 2
projection of a = a² / c
projection of b = b² / c

Worked Example 1: Two Legs

Suppose a = 3 and b = 4. Apply the Pythagorean theorem to find the hypotenuse:

c = √(3² + 4²)
c = √(9 + 16) = √25 = 5

Angle A equals arctan(3/4), or about 36.869898 degrees. Angle B equals 90 degrees minus A, or about 53.130102 degrees. The area is (3 × 4)/2 = 6 square units, while the perimeter is 3 + 4 + 5 = 12 units.

The hypotenuse altitude is (3 × 4)/5 = 2.4. The inradius is 3 × 4/(3 + 4 + 5) = 1, and the circumradius is 5/2 = 2.5. These values also verify the solved triangle: the two hypotenuse projections equal 9/5 and 16/5, whose sum is 5.

Worked Example 2: Leg and Hypotenuse

Suppose leg a = 5 and hypotenuse c = 13. Since the hypotenuse is longer than the known leg, the missing leg is real and positive:

b = √(13² − 5²)
b = √(169 − 25) = √144 = 12

Angle A is arcsin(5/13), approximately 22.619865 degrees. Angle B is approximately 67.380135 degrees. The area is 5 × 12/2 = 30 square units, and the perimeter is 5 + 12 + 13 = 30 units. The altitude to the hypotenuse is 60/13, or about 4.615385 units. The inradius is 2, and the circumradius is 6.5.

Worked Example 3: Hypotenuse and Angle

Suppose c = 10 and A = 30 degrees. Leg a is opposite A, so use sine. Leg b is adjacent to A, so use cosine:

a = 10 sin(30°) = 5
b = 10 cos(30°) = 5√3 ≈ 8.660254
B = 90° − 30° = 60°

The area is about 21.650635 square units and the perimeter is about 23.660254 units. This is a 30-60-90 triangle, so the side ratio 1:√3:2 provides an exact check on the decimal results.

Special Right Triangles

Two angle patterns produce familiar exact side ratios. They offer a fast way to review a result before relying on a rounded decimal.

TriangleAngle patternSide ratioUseful check
45-45-9045°, 45°, 90°1 : 1 : √2The two legs are equal
30-60-9030°, 60°, 90°1 : √3 : 2The hypotenuse is twice the short leg

For a 45-45-90 triangle with each leg equal to 7, the hypotenuse is 7√2. For a 30-60-90 triangle with hypotenuse 10, the short leg is 5 and the long leg is 5√3. The calculator detects both patterns within a small numerical tolerance.

Understanding the Additional Measurements

The altitude to the hypotenuse is useful when the original right triangle is divided into two smaller similar triangles. The projection values describe the two segments of the hypotenuse created by the altitude. Their sum must equal c, while their product equals the square of the altitude.

The inradius belongs to the circle tangent to all three sides. The circumradius belongs to the circle passing through all three vertices. For every right triangle, the circumradius is exactly half the hypotenuse because the hypotenuse forms a diameter of the circumcircle.

A median connects a vertex to the midpoint of the opposite side. The median to the hypotenuse also equals c/2. The other two medians follow from the general median formula. These outputs support geometry exercises and provide independent checks on the main answer.

Right Triangle Calculator vs General Triangle Calculator

FeatureRight triangle calculatorGeneral triangle calculator
Fixed angleC is always 90 degreesNo angle is fixed
Minimum dataTwo values, including one sideUsually SSS, SAS, ASA, AAS or SSA
Main formulasPythagorean theorem and basic trigonometryLaw of Sines, Law of Cosines and Heron's formula
Ambiguous SSA caseNoSometimes gives two triangles
Special outputsHypotenuse altitude and projectionsGeneral altitudes, medians and bisectors

Use this page only when one angle is confirmed as 90 degrees. If the triangle is not right, use the general triangle calculator. Treating an almost-right or unknown triangle as exactly right forces the Pythagorean relationship and may create a misleading result.

Accuracy, Units and Invalid Inputs

The calculator keeps full browser precision during the calculation and rounds only the displayed values. It uses Math.hypot for two-leg problems, a cancellation-resistant missing-leg formula, two-argument arctangent for acute angles and normalized formulas for derived values. Supported side inputs range from 1e-150 through 1e150, subject to a well-conditioned triangle and finite outputs.

  • Do not mix centimetres, metres, inches or feet. The unit selector labels the result but does not convert entered numbers.
  • The hypotenuse must be strictly longer than either leg. An equal value creates a zero missing leg, not a triangle.
  • Angles A and B must each lie between 0 and 90 degrees and must add to 90 degrees.
  • Do not use zero as a placeholder. Leave an unknown field empty.
  • Enter 1250 instead of 1,250. Commas, units and full expressions are rejected.

Rounded source measurements limit the real accuracy of the answer. A diagram helps explain the labels and proportions, but screen pixels are not a substitute for numerical results. The formulas apply to flat Euclidean geometry rather than spherical triangles.

Common Uses

Right-triangle calculations appear in roof and stair layouts, diagonal screen dimensions, rectangular construction checks, coordinate distance, classroom geometry, navigation exercises, surveying practice and angle-of-elevation problems. A diagonal across a rectangle is its hypotenuse. A vertical height and horizontal run form the legs of a slope problem.

For construction, machining, surveying or engineering work, account for measurement uncertainty, tolerances, material behavior and applicable codes. A correct mathematical formula does not verify the quality of the measurements entered.

Method and Review Basis

The Pythagorean theorem, side labels and worked side examples follow OpenStax right-triangle trigonometry. The sine, cosine, tangent and complementary-angle explanations follow OpenStax Precalculus 2e. The implementation uses a strict number parser and never executes entered text as code. Calculations and the six-item history remain in the current page and disappear when the page reloads.

Related Calculators

Frequently Asked Questions

What is a right triangle?

A right triangle is a triangle with one interior angle equal to 90 degrees. The side opposite that angle is the hypotenuse, and the two sides forming the right angle are the legs.

How many values are needed to solve a right triangle?

You need two independent values, including at least one side. Valid inputs include two sides or one side with one acute angle. One side alone does not determine the shape, while two angles alone do not determine the size.

Can I solve a right triangle using only two angles?

No. Two angles determine the shape because the third angle is fixed at 90 degrees, but similar triangles may have any scale. Enter at least one side to calculate actual lengths, perimeter and area.

How do I find the hypotenuse from two legs?

Apply the Pythagorean theorem: c = square root of a squared plus b squared. For legs 3 and 4, c = square root of 9 + 16 = 5.

How do I find a missing leg from the hypotenuse?

Subtract the known leg's square from the hypotenuse's square, then take the positive square root. For c = 13 and a = 5, b = square root of 169 minus 25 = 12.

How do I calculate the acute angles of a right triangle?

Use an inverse trigonometric ratio. For example, A = arctan(a/b), arcsin(a/c), or arccos(b/c). The other acute angle is 90 degrees minus A.

What if I know one side and one angle?

One side fixes the scale and one acute angle fixes the shape. The calculator uses sine, cosine or tangent according to whether the known side is opposite, adjacent or the hypotenuse.

Why must the hypotenuse be the longest side?

The hypotenuse lies opposite the 90-degree angle, which is the triangle's largest angle. The side opposite the largest angle is longest, and c squared equals the positive sum a squared plus b squared.

What is the difference between a right triangle calculator and a general triangle calculator?

A right triangle calculator fixes one angle at 90 degrees and uses the Pythagorean theorem plus basic trigonometry. A general triangle solver handles SSS, SAS, ASA, AAS and the potentially ambiguous SSA case.

How accurate are the calculator results?

The tool keeps full browser precision and rounds only the display. Its practical accuracy still depends on your source measurements, consistent units and selected decimal places. Verify safety-critical results independently.

Disclaimer: This calculator provides general mathematical results for education, estimation and planning. It is not financial, engineering, construction, surveying or safety advice. Verify inputs, units, tolerances and important results with an appropriate qualified professional.

Post a Comment

0Comments

Post a Comment (0)