Quick answer
In a right triangle with legs a and b, the hypotenuse is c = √(a² + b²), the area is ab ÷ 2 and the acute angles are atan(a ÷ b) and atan(b ÷ a). For legs 3 and 4: c = 5, area 6, perimeter 12 and angles 36.87° and 53.13°.
Enter the two legs. The calculator returns the hypotenuse, area, perimeter and both acute angles.
Related tools: Pythagorean Theorem Calculator: Find the hypotenuse or a missing leg of a right triangle. Triangle Calculator: Area, perimeter, angles and type of a triangle from its three sides. Trigonometry Calculator: All six trigonometric functions of an angle.
How to use the Right Triangle Calculator
- Enter leg a (above 0).
- Enter leg b (above 0).
- Press Calculate to see the result, and use Reset to start again.
| Input | What to enter | Allowed values |
|---|---|---|
| Leg a | A number | > 0 |
| Leg b | A number | > 0 |
Formula and method
Formula
c = √(a² + b²); A = ab/2; α = atan(a/b)
IEEE-754 double precision; shown to at most 6 decimal places.
Pythagorean theorem and inverse tangent.
Worked examples
This example is verified: each one is an automated test case that the live calculator must reproduce exactly.
Example 1
Inputs: Leg a = 3; Leg b = 4.
| Result | Value |
|---|---|
| Hypotenuse c | 5 |
| Area | 6 |
| Perimeter | 12 |
| Angle α (opposite a) | 36.869898° |
| Angle β (opposite b) | 53.130102° |
The first line is the headline result (hypotenuse c). Below it the right Triangle Calculator lists area, perimeter, angle α (opposite a) and angle β (opposite b), which describe the same case from other angles. IEEE-754 double precision; shown to at most 6 decimal places.
Special right triangles
A 45-45-90 triangle has sides in the ratio 1 : 1 : √2, and a 30-60-90 triangle has sides 1 : √3 : 2. The 3-4-5 triangle is the smallest whole-number right triangle; multiples such as 6-8-10 keep the same angles.
What this tool takes
It starts from the two legs. If you know the hypotenuse and a leg, use the Pythagorean Theorem calculator, and if you know a side and an angle use the Right Triangle Side and Angle calculator. Legs must be positive.
How the result changes with leg a
Holding every other input at the first worked example, this table changes only leg a. It shows how sensitive the answer is to that one value; each row was produced by running this calculator.
| Leg a | Hypotenuse c | Area | Perimeter |
|---|---|---|---|
| 1.5 | 4.272002 | 3 | 9.772002 |
| 3 | 5 | 6 | 12 |
| 6 | 7.211103 | 12 | 17.211103 |
| 12 | 12.649111 | 24 | 28.649111 |
What happens with invalid input
These messages are produced by the calculator itself, so you know what to fix.
- Leg a: entering "-1" shows "Leg a must be greater than 0." beside that field and no result.
Choosing between the Right Triangle Calculator and similar calculators
Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.
| Calculator | You enter | It returns |
|---|---|---|
| [Pythagorean Theorem Calculator](/math/pythagorean-theorem-calculator/) | find, leg a and other side | Hypotenuse c |
| [Triangle Calculator](/math/triangle-calculator/) | side a, side b and side c | Area |
| [Trigonometry Calculator](/math/trigonometry-calculator/) | angle and unit | sin |
| [Law of Cosines Calculator](/math/law-of-cosines-calculator/) | side b, side c and included angle A | Side a |
| [Right Triangle Area Calculator](/math/right-triangle-area/) | leg a and leg b | Area |
Background: geometry measurements
Geometry results carry units that depend on the quantity: a perimeter or length is in linear units such as cm, an area or surface area is in square units (cm²) and a volume is in cubic units (cm³). Use one length unit for every input, because the calculator multiplies the numbers as given.
Flat (2D) shapes have an area and a perimeter; solids (3D) have a surface area and a volume. Two familiar checks: a circle of radius r has area πr² and circumference 2πr, and a sphere has volume (4/3)πr³ and surface area 4πr².
Assumptions and limitations
- Legs must be positive
If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for leg a to confirm this.
Frequently asked questions
What is the hypotenuse?
The side opposite the right angle and the longest side.
How do I find an acute angle?
atan(opposite ÷ adjacent).
Do the angles always add to 180°?
Yes: the right angle plus the two acute angles make 180°.
What does the Right Triangle Calculator calculate?
Solve a right triangle from its two legs: hypotenuse, angles, area and perimeter. It returns Hypotenuse c, Area, Perimeter, Angle α (opposite a) and Angle β (opposite b).
What formula does the Right Triangle Calculator use?
c = √(a² + b²); A = ab/2; α = atan(a/b). Pythagorean theorem and inverse tangent.
What do I need to enter in the right Triangle Calculator?
You enter Leg a and Leg b.
How is the result rounded or limited?
IEEE-754 double precision; shown to at most 6 decimal places. Legs must be positive.
What is an example of a right Triangle result?
With leg a 3 and leg b 4, the hypotenuse c is 5.
Related calculators
- Pythagorean Theorem Calculator — Find the hypotenuse or a missing leg of a right triangle.
- Triangle Calculator — Area, perimeter, angles and type of a triangle from its three sides.
- Trigonometry Calculator — All six trigonometric functions of an angle.
- Law of Cosines Calculator — Third side of a triangle from two sides and the included angle (law of cosines).
- Right Triangle Area Calculator — Area of a right triangle from its legs.
- Right Triangle Side and Angle Calculator — Complete a right triangle from any two sides.
- 45-45-90 Triangle Calculator — Sides of a 45°-45°-90° triangle from one leg.
- 30-60-90 Triangle Calculator — Sides of a 30°-60°-90° triangle from the short leg.
- Triangle Centroid Calculator — Centroid of a triangle from its vertices.
Sources
- OpenStax, Prealgebra 2e (Rice University): perimeter, area, volume, circumference and the Pythagorean theorem
Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.