Skip to content
ToolPaxaAll Tools for Everyone, in One Place.All calculators

Right Triangle Calculator

Enter two measurements to find the sides, angles, altitude, area and perimeter of a right triangle.

Formula reference

a²+b²=c²; α+β=90°

All formulas
  • a²+b²=c²; α+β=90°
  • sin α=a/c; cos α=b/c; tan α=a/b
  • A=ab/2=ch/2; P=a+b+c
  • h=ab/c; p=a²/c; q=b²/c
  • r=2A/P; R=c/2
  • t=ab; a+b=√(c²+2t); |a−b|=√(c²−2t)
  • b=(P−2a)P/[2(P−a)]; P>2a
  • b=ah/√[(a−h)(a+h)]; h<a
  • c=P²/[2(P+h)]; c=(P²−4A)/(2P)
  • θ_rad=θ_deg·π/180
Right triangle with sides, angles and altitudea faces α, b faces β, and h meets c at a right angle.abchαβpq
a faces α, b faces β, and h meets c at a right angle.

Enter two values. Two angles alone do not set the size.

Digits to show, starting at the first nonzero digit.

Your result

Your answer and calculation steps appear here.

Inputs and calculations stay in this browser tab. Copy or export your report before closing.

How to solve a right triangle

Enter exactly two values. One must set the size: a side, altitude, area or perimeter. Side a is opposite α and side b is opposite β. The hypotenuse is c; h is perpendicular to c.

Read the diagram and choose two measurements

The legs a and b meet at 90°. The hypotenuse c faces that angle. α faces a and β faces b. The altitude h runs from the right angle to c and is usually shorter than either leg. Two independent measurements are needed, and at least one must set the size.

Right triangle with sides, angles and altitudea faces α, b faces β, and h meets c at a right angle.abchαβpq
a faces α, b faces β, and h meets c at a right angle.

Solve from sides or a side and an angle

With a = 3 and b = 4, c = √(9+16) = 5. Then tan α = 3/4, so α ≈ 36.87° and β ≈ 53.13°. With c = 10 and α = 30°, a = c sin α = 5 and b = c cos α = 5√3. In radians, 30° is π/6.

Use area, altitude and perimeter

A = ab/2 = ch/2, and P = a+b+c. For example, A = 6 and P = 12 give c = (P²−4A)/(2P) = 5. The product ab is 12, and a+b is 7, giving legs 3 and 4. If only these symmetric measurements are known, both label assignments are possible.

Understand the two solutions

If the chosen pair does not identify one leg or one acute angle, the same shape may have a = 3, b = 4 or a = 4, b = 3. They swap α and β as well. Equal legs give one solution. When c and h are known, h cannot exceed c/2; equality gives the isosceles case.

Check projections and common triangles

The altitude divides c into p = a²/c and q = b²/c, and p+q = c. The inradius is 2A/P, while the circumradius is c/2. The ratios 1:√3:2 and 1:1:√2 describe 30°–60°–90° and 45°–45°–90° triangles.

Use consistent units and appropriate rounding

Convert all lengths to one unit. Area uses its square. Enter angles in degrees or radians according to the selector; in radians, π/6 is accepted. The steps show the formula and substitutions. Copy or download the working and use display digits that fit your measurements.

Use the Pythagorean Theorem Calculator if you need only a missing side with an exact radical or want to check three sides. The Triangle Calculator handles non-right triangles. Use the Area Calculator for the base–height formula, Slope Calculator for rise and run, Distance Calculator for endpoints on a grid, and Root Calculator to check a square root.

OpenStax — Right Triangle Trigonometry introduces the sine, cosine and tangent ratios. OpenStax — The Pythagorean Theorem gives the squared-side relation, and Wolfram MathWorld — Right Triangle documents altitude, projections and circle radii. BIPM SI Brochure and ISO 80000-2:2019 cover unit and notation conventions.

Common questions

Can I enter two angles?

No. The two acute angles fix the shape but not the size. Enter one angle and a length, area or perimeter.

Why do I get two solutions?

Some inputs do not specify which leg is a. The results show both assignments unless the legs are equal.

Is h one of the legs?

No. h is the perpendicular distance from the right-angle vertex to the hypotenuse.

How do I enter radians?

Choose radians and use a decimal, fraction or an expression such as π/6.

What are significant digits?

They count from the first nonzero digit. At 3, 123.456 rounds to 123.

Can the altitude exceed the hypotenuse?

No. In a right triangle h is at most half the hypotenuse.

Explore related tools