Triangle Calculator
Enter two legs of a right triangle for the hypotenuse, area, perimeter, and angles, or a base and height for the area.
Calculation
Legs
The two legs meet at the right angle. Enter positive numbers; decimals are fine.
Results
Everything is calculated in your browser. Nothing is uploaded.
How to calculate a right triangle
Choose a mode
Pick Right triangle to work from two legs, or Area to work from a base and height.
Enter your measurements
Type the two legs, or the base and height, using any positive numbers including decimals.
Read the results
The hypotenuse, area, perimeter, and angles update as you type, with no button to press.
Copy the answer
Click the copy button to put the full set of results on your clipboard.
Why use this tool
Hypotenuse from two legs
Enter the two legs of a right triangle and get the hypotenuse from the Pythagorean relationship, so legs of 3 and 4 return 5.
Area, perimeter, and angles
Two legs also give you the area, the perimeter, and both acute angles in degrees, which always add up to 90.
Area from base and height
Switch to base and height to get the area of any triangle, right angled or not, as half the base times the height.
Decimals welcome
Every field accepts decimals, so 2.5 by 4.2 is handled as readily as whole numbers.
Guards the tricky cases
Blank fields, zero, negative sides, and non-numeric text are caught with a clear message instead of a broken result.
Runs entirely in your browser
Every calculation happens on your device. Nothing you type is uploaded.
About this tool
A right triangle has one 90 degree corner, and its two shorter sides, the legs, sit either side of that corner. Enter the two legs and this calculator returns the hypotenuse using the Pythagorean relationship, where the hypotenuse squared equals the sum of the squares of the legs. The classic legs of 3 and 4 give a hypotenuse of 5. Alongside the hypotenuse you get the area, the perimeter, and the two acute angles in degrees, which always add up to 90 so the whole triangle totals 180.
The base and height mode covers the other everyday job: the area of any triangle, not just a right one. Area is half the base times the height, so a base of 10 and a height of 6 give an area of 30. This holds for any triangle as long as the height is measured straight down to the base at a right angle. Use it for a plot of land, a gable end, a sail, or any three sided shape where you know how wide the base is and how tall it stands.
Every value updates the moment you type, there is no button to press, and nothing you enter leaves your device. Sides must be positive numbers; zero, blanks, negatives, and text are caught with a short message instead of a broken result. For wider maths with trig functions and powers see the scientific calculator, and for reducing side ratios to lowest terms see the ratio calculator.
Frequently asked questions
- How do I find the hypotenuse of a right triangle?
- Choose the two legs mode and enter both legs. The calculator squares each leg, adds them, and takes the square root, so legs of 3 and 4 give a hypotenuse of 5. It also shows the area, perimeter, and both acute angles.
- How is the area of a triangle calculated?
- Area is half the base times the height. In base and height mode a base of 10 and a height of 6 give an area of 30. This works for any triangle as long as the height is measured at a right angle to the base.
- What numbers can I enter?
- Any positive numbers, including decimals. Sides and lengths must be greater than zero; zero, blank fields, negatives, and text are rejected with a short message rather than a wrong answer.
- Does this work for triangles that are not right angled?
- The base and height mode gives the area of any triangle. The hypotenuse, perimeter, and angle outputs assume a right triangle, since those depend on the 90 degree corner between the two legs.
- Is my data uploaded anywhere?
- No. Everything runs in your browser; nothing is sent to a server.
Related tools
Scientific Calculator
Type a full expression with trigonometry, logarithms, powers, roots, and factorials, and see the result update live as you go.
Ratio Calculator
Reduce a ratio to lowest terms, or solve a proportion for the one value you are missing.
Aspect Ratio Calculator
Solve the missing width or height for any aspect ratio, from 16:9 to a custom shape.
401(k) Calculator
Project your 401(k) balance at retirement from your contributions, employer match, and expected return, year by year.
Amortization Schedule Calculator
Build a full payment-by-payment schedule for any fixed-rate loan, with the payoff date and the interest you save by paying extra.
APY Calculator
Turn a nominal rate and compounding frequency into the true annual percentage yield, project a balance, or reverse solve the rate.