Boneyard Tools

Solving right triangles with Pythagoras and SOHCAHTOA

How the Pythagorean theorem and the sine, cosine, and tangent ratios let you find every side and angle from just two known values.

The two toolkits

Every right triangle can be solved with two ideas working together. The Pythagorean theorem, a squared plus b squared equals c squared, connects the three side lengths whenever you know two of them. The trigonometric ratios connect a side to an angle. Which tool you reach for depends on what you were given: two sides call for Pythagoras, while a side and an angle call for trigonometry. This calculator picks the right identity automatically based on the two fields you fill in.

When you know two sides

Given the two legs, the hypotenuse is the square root of a squared plus b squared, so the classic 3 and 4 legs give a hypotenuse of 5. Given a leg and the hypotenuse, you rearrange to get the missing leg as the square root of the hypotenuse squared minus the known leg squared. The angles then follow from the sides: angle A is the arctangent of Leg a over Leg b. Because the hypotenuse must be the longest side, the tool rejects any leg that is not strictly shorter than it.

When you know a side and an angle

This is where SOHCAHTOA earns its name. Sine is opposite over hypotenuse, cosine is adjacent over hypotenuse, and tangent is opposite over adjacent. If you know Leg a and angle A, then the hypotenuse is Leg a divided by the sine of A, and Leg b is Leg a divided by the tangent of A. Give the hypotenuse and angle A instead and the legs come straight from hypotenuse times sine and hypotenuse times cosine. The calculator converts your degrees to radians before evaluating these functions.

Area, perimeter, and rounding

Once all three sides are known, the extras are quick. The two legs are perpendicular, so the area is half their product, and the perimeter is the sum of all three sides. Many of these results are irrational, such as a hypotenuse of the square root of 2, so the tool rounds every value to four decimal places. Clean cases like the 3-4-5 triangle come out exact, while a 30 degree angle yields tidy pairings like a hypotenuse exactly double the opposite leg.

Frequently asked questions

Do I need the angle to be angle A, not angle B?

Yes. This solver takes the acute angle opposite Leg a. Angle B is always 90 minus angle A, so if you know angle B, subtract it from 90 and enter that as angle A.

Can I solve a triangle from two angles?

Not here. A right triangle already uses one angle for the 90 degree corner, leaving only one free acute angle, and an angle without a side does not fix the size. You must supply at least one side length.