Right Triangle Calculator: Solve Sides & Angles
Short answer
The Right Triangle Calculator solves all missing dimensions of a 90-degree triangle from any two known parameters, including sides, angles, area, and altitude. For example, entering leg a = 3 and leg b = 4 calculates hypotenuse c = 5, acute angles A ≈ 36.8699° and B ≈ 53.1301°, area = 6, perimeter = 12, and height to the hypotenuse = 2.4.
Formula
a² + b² = c²; sin A = a/c, cos A = b/c, tan A = a/b
Right triangle calculations rely on the Pythagorean theorem and fundamental trigonometry. In the formula a² + b² = c², 'a' and 'b' are the mutually perpendicular legs, and 'c' is the hypotenuse opposite the 90-degree right angle. For acute angles A and B, the primary trigonometric ratios define their relationships: sin A = a/c, cos A = b/c, and tan A = a/b. Complementary angles satisfy A + B = 90°. The triangle's total surface space is given by Area = (a · b) / 2, while total boundary length is Perimeter = a + b + c. The perpendicular altitude from the right angle to the hypotenuse is computed as height h = (a · b) / c.
Worked example
- Known values
- ab
- First value (a or c)
- 3
- Second value (b, c or angle A in °)
- 4
- Sides a, b, c: 3, 4, 5
- Angles A, B: 36.8699°, 53.1301°
- Area: 6
- Perimeter: 12
- Height to hypotenuse: 2.4
How the Right Triangle Calculator Works
A right triangle (or right-angled triangle) is a three-sided planar polygon defined by one internal angle measuring exactly $90^\circ$, commonly referred to as the right angle. In Euclidean geometry, the properties of right triangles serve as the cornerstone of trigonometry, analytic geometry, and structural engineering. The two sides that intersect to form the $90^\circ$ angle are designated as the legs ($a$ and $b$), while the third and longest side, situated directly opposite the right angle, is the hypotenuse ($c$).
The Right Triangle Calculator solves for every geometric dimension of the triangle when provided with just two independent known values. Depending on the scenario, you can input:
- Two legs ($a$ and $b$): The base and vertical height of the right angle.
- One leg and the hypotenuse ($a$ and $c$): A perpendicular side and the opposing long side.
- One leg and its opposite angle ($a$ and $A$): A linear side and the angle facing it.
- The hypotenuse and an acute angle ($c$ and $A$): The diagonal length and one acute inclination.
The Mathematical Foundations
The calculator combines three primary mathematical principles to resolve unknown values:
1. The Pythagorean Theorem
Formulated for all right-angled triangles in a flat plane, this theorem states that the square of the hypotenuse equals the sum of the squares of the other two sides: $$a^2 + b^2 = c^2$$ When both legs are known, the hypotenuse is determined via: $$c = \sqrt{a^2 + b^2}$$ Conversely, if the hypotenuse $c$ and one leg $a$ are known, the missing leg $b$ is computed as: $$b = \sqrt{c^2 - a^2}$$
2. Trigonometric Ratios
The acute angles of the triangle, denoted as $A$ (opposite leg $a$) and $B$ (opposite leg $b$), are governed by direct trigonometric relationships: $$\sin A = \frac{\text{Opposite}}{\text{Hypotenuse}} = \frac{a}{c}$$ $$\cos A = \frac{\text{Adjacent}}{\text{Hypotenuse}} = \frac{b}{c}$$ $$\tan A = \frac{\text{Opposite}}{\text{Adjacent}} = \frac{a}{b}$$ Because the sum of all interior angles in any Euclidean triangle equals $180^\circ$, and one angle is fixed at $90^\circ$, the two acute angles are complementary: $$A + B = 90^\circ \implies B = 90^\circ - A$$
3. Derived Geometric Metrics
Once all sides and angles are resolved, the tool computes three critical secondary metrics:
- Area: Because the two legs are mutually perpendicular, each serves as the altitude for the other: $$\text{Area} = \frac{a \cdot b}{2}$$
- Perimeter: The total linear distance around the perimeter: $$\text{Perimeter} = a + b + c$$
- Height to Hypotenuse ($h$): The perpendicular line segment extending from the right-angled vertex to the hypotenuse. By equating area representations—$\frac{a \cdot b}{2} = \frac{c \cdot h}{2}$—the altitude simplifies to: $$h = \frac{a \cdot b}{c}$$
Step-by-Step Worked Example
To observe the calculation process in detail, consider the standard configuration where the lengths of both perpendicular legs are known.
Selected Input Parameters
- Known values option ($k$): Leg $a$ and leg $b$ (
ab) - First value ($x$): $3$
- Second value ($y$): $4$
Step 1: Calculate Hypotenuse $c$
Using the Pythagorean theorem: $$c = \sqrt{a^2 + b^2}$$ $$c = \sqrt{3^2 + 4^2} = \sqrt{9 + 16} = \sqrt{25} = 5$$
Step 2: Calculate Acute Angle $A$
Using the tangent function for angle $A$ (opposite leg $a$): $$\tan A = \frac{a}{b} = \frac{3}{4} = 0.75$$ $$A = \arctan(0.75) \approx 36.86989765^\circ$$ Rounding to four decimal places gives: $$A = 36.8699^\circ$$
Step 3: Calculate Acute Angle $B$
Because angles $A$ and $B$ are complementary: $$B = 90^\circ - A$$ $$B = 90^\circ - 36.86989765^\circ \approx 53.13010235^\circ$$ Rounding to four decimal places yields: $$B = 53.1301^\circ$$
Step 4: Calculate the Area
Using the formula for the area of a right triangle: $$\text{Area} = \frac{a \cdot b}{2} = \frac{3 \cdot 4}{2} = \frac{12}{2} = 6$$
Step 5: Calculate the Perimeter
Summing all three exterior side lengths: $$\text{Perimeter} = a + b + c = 3 + 4 + 5 = 12$$
Step 6: Calculate the Height to Hypotenuse ($h$)
Using the relationship between area and hypotenuse: $$h = \frac{a \cdot b}{c} = \frac{3 \cdot 4}{5} = \frac{12}{5} = 2.4$$
Summary of Results
- Sides a, b, c: $3, 4, 5$
- Angles A, B: $36.8699^\circ, 53.1301^\circ$
- Area: $6$
- Perimeter: $12$
- Height to hypotenuse: $2.4$
How to Interpret Your Results
Interpreting the output of the Right Triangle Calculator requires an understanding of how each metric relates to spatial planning and physical layouts.
Sides ($a, b, c$)
The sides reflect the linear extents of your boundary. The hypotenuse ($c$) must always be strictly larger than leg $a$ or leg $b$, but strictly less than their sum ($a + b$), fulfilling the triangle inequality theorem. In real-world fabrication, if you are building stairs, rafters, or structural brackets, leg $a$ represents the rise, leg $b$ represents the run, and hypotenuse $c$ represents the diagonal stringer or rake.
Acute Angles ($A, B$)
The angles represent the pitch, slope, or incline of the diagonal. In architectural and drafting conventions, angle $A$ represents the angle of elevation from the horizontal base ($b$) up along the diagonal ($c$), while angle $B$ represents the plumb cut or pitch relative to the vertical line ($a$). Always verify that $A + B = 90.0000^\circ$. A minor discrepancy in high-decimal calculations typically indicates rounding differences, but the analytical sum is fixed.
Surface Area and Perimeter
- Area: Expressed in square units (such as square inches, square feet, or square meters). This metric indicates the amount of material required to cover the triangular surface, such as drywall, plywood sheathing on a gable end, or concrete formwork.
- Perimeter: Expressed in linear units. This value provides the exact length needed for continuous trim, perimeter flashing, structural framing members, or edging.
Height to Hypotenuse ($h$)
The altitude is particularly informative in structural design and geometric decomposition. Dropping this perpendicular line divides the original triangle into two smaller, right-angled sub-triangles. Crucially, both of these sub-triangles are geometrically similar to each other and to the parent triangle. This measurement is widely used when designing roof trusses (such as king-post or queen-post trusses) where internal vertical braces must meet a rafter at a strict $90^\circ$ angle.
Practical Tips
Applying right triangle geometry to real-world tasks involves physical constraints that pure equations do not account for. Keep these technical recommendations in mind:
1. Maintain Unit Consistency
Always convert all measurements to a common unit before entering them into the tool. Entering a rise of $18$ inches and a run of $2$ feet without converting the run to $24$ inches will generate an incorrect triangle. If working with imperial fractions (e.g., $5\frac{3}{8}$ inches), convert the fraction to decimal format ($5.375$ inches) prior to entry.
2. Verify Field Squareness with the 3-4-5 Method
In carpentry and site excavation, tradespeople frequently use the $(3, 4, 5)$ Pythagorean triple to verify right angles. To square a deck framing corner or foundation line, measure $3$ feet along one ledger, $4$ feet along the perpendicular rim joist, and check the diagonal span between the marks. If the diagonal measures exactly $5$ feet, the corner is confirmed at $90^\circ$.
3. Consider Safety Standards for Incline
When using right triangle calculations for ladder positioning, ramp design, or stair layouts, check regulatory standards. For instance, the Occupational Safety and Health Administration (OSHA) mandates a $4:1$ ratio for non-self-supporting extension ladders—for every $4$ feet of vertical rise ($a$), the base ($b$) should be placed $1$ foot away from the wall. This corresponds to an acute angle of approximately $75.96^\circ$: $$\tan A = \frac{4}{1} = 4 \implies A = \arctan(4) \approx 75.96^\circ$$
4. Watch for Cumulative Decimal Rounding
When transferring digital results to layout tools, avoid rounding intermediate figures. If an angle is computed as $36.8699^\circ$, rounding to $37^\circ$ across a 50-foot commercial steel truss can translate into a lateral error of several inches at the ridge. Use full-precision numbers until the final cut list or layout mark is made.
Comparison
| Scenario | Input | Result |
|---|---|---|
| Base example | Default inputs | Sides a, b, c: 3, 4, 5 |
Common mistakes
- Confusing a perpendicular leg (a or b) with the hypotenuse (c), which must always be the longest side.
- Entering angular measurements in radians or attempting to input an acute angle equal to or exceeding 90 degrees.
- Assuming the height to the hypotenuse is merely one of the perpendicular legs instead of calculating the altitude h = (a · b) / c.
- Attempting to solve an impossible triangle where the hypotenuse is specified as smaller than or equal to a given leg (c <= a).
- Rounding intermediate trigonometric ratios prematurely, causing cascading inaccuracies in the final angles, perimeter, and area.
Checklist
- Identify which two distinct values are already known (e.g., two legs, leg and hypotenuse, or a side and an acute angle).
- Confirm that the geometric figure contains a true 90-degree right angle.
- Standardize all input dimensions into identical linear measurement units before calculation.
- Verify that any specified acute angle is strictly between 0 and 90 degrees.
- Ensure that any entered hypotenuse strictly exceeds the length of the provided leg.
- Record all primary outputs, including sides, complementary angles, area, perimeter, and altitude to hypotenuse.

Michael Torres
Co-Founder & Chief Editor, Calculators PercentageCo-Founder & Chief EditorMichael Torres writes about personal finance, loans, and savings for the financial blog The Money Leads.
This calculator provides geometric evaluations based on standard Euclidean mathematical principles for design, educational, and preliminary planning purposes. Always consult a licensed structural engineer, surveyor, or local building code official when determining critical load-bearing dimensions, structural framing, or property boundaries.
