Right Triangle Calculator

Enter any two values of a right triangle, including one side, to find every side and angle, the area, perimeter, altitude, inradius and circumradius.

Right triangle calculator

Enter any two values, including at least one side. Angle C is the right angle; side c is the hypotenuse; side a is opposite angle A.

Area

    Working

    Uses a² + b² = c² and the trigonometric ratios sin A = a/c, cos A = b/c and tan A = a/b. Angles A and B always add up to 90°.

    On this page

    A right triangle calculator solves a right-angled triangle completely from any two known values, as long as at least one of them is a side. It finds the missing sides and angles using the Pythagorean theorem and the trigonometric ratios sine, cosine and tangent, then adds the area, perimeter, altitude to the hypotenuse, inradius and circumradius, with every step shown.

    For example, with legs of 3 and 4 the hypotenuse is 5 and the angles are 36.87° and 53.13°. With one leg of 6 opposite a 30° angle, the hypotenuse is 12 and the other leg is about 10.39.

    How to use the right triangle calculator

    1. Enter exactly two known values from: side a, side b, hypotenuse c, angle A and angle B.
    2. At least one value must be a side. Two angles alone fix the shape but not the size.
    3. Angles are in degrees and must be less than 90°, because angle C is the 90° right angle.
    4. Press Solve to see every side, angle and property of the triangle.

    Labelling a right triangle

    The calculator uses the standard labels. Angle C is the right angle, and the side opposite it, c, is the hypotenuse, always the longest side. Side a is opposite angle A, and side b is opposite angle B. Sides a and b are called the legs, and they meet at the right angle. Relative to angle A, side a is the opposite side and side b is the adjacent side.

    The formulas

    Pythagorean theorem

    a² + b² = c². Use it when you know two sides and want the third.

    Trigonometric ratios (SOH CAH TOA)

    • sin A = opposite ÷ hypotenuse = a ÷ c
    • cos A = adjacent ÷ hypotenuse = b ÷ c
    • tan A = opposite ÷ adjacent = a ÷ b

    Use these when you know a side and an angle, or when you know two sides and want an angle, using the inverse functions arcsin, arccos and arctan.

    Angle sum

    The three angles of any triangle add up to 180°. With C = 90°, the other two always add up to 90°: A + B = 90°.

    Other properties

    • Area = ½ × a × b
    • Perimeter = a + b + c
    • Altitude to the hypotenuse = a × b ÷ c
    • Inradius = (a + b − c) ÷ 2
    • Circumradius = c ÷ 2, because the hypotenuse is a diameter of the circumscribed circle

    Worked examples

    Two legs known

    With a = 3 and b = 4: c = √(9 + 16) = 5. Angle A = arctan(3 ÷ 4) ≈ 36.87°, and angle B = 90° − 36.87° = 53.13°. The area is ½ × 3 × 4 = 6.

    A leg and an angle

    Side a = 6 and angle A = 30°. Then B = 60°. The hypotenuse is c = a ÷ sin A = 6 ÷ 0.5 = 12, and side b = a ÷ tan A = 6 ÷ 0.57735 ≈ 10.39.

    The hypotenuse and an angle

    Hypotenuse c = 10 and angle A = 30°. Then a = c × sin A = 10 × 0.5 = 5, and b = c × cos A = 10 × 0.866 ≈ 8.66.

    Solving real problems

    Height of a tree

    You stand 20 m from a tree and measure the angle up to its top as 35°. The tree’s height above your eye level is the opposite side, and the 20 m is the adjacent side, so height = 20 × tan 35° ≈ 14.0 m. Add your eye height to get the full height of the tree.

    Ladder safety

    Ladder guidance often suggests an angle of about 75° to the ground. For a 4 m ladder at 75°, the foot should be about 4 × cos 75° ≈ 1.04 m from the wall, and the top reaches about 4 × sin 75° ≈ 3.86 m up.

    Ramp design

    A wheelchair ramp with a slope of 1 : 12 rises 1 unit for every 12 units of horizontal run. The angle is arctan(1 ÷ 12) ≈ 4.76°. To rise 0.5 m, the ramp needs a horizontal run of 6 m and a sloping length of √(0.5² + 6²) ≈ 6.02 m.

    Roof pitch

    A roof with a pitch of 6 in 12 rises 6 units for every 12 units of horizontal run. Its angle is arctan(6 ÷ 12) ≈ 26.57°. If the horizontal run from the wall to the ridge is 4 m, the rise is 2 m and each rafter must be at least √(4² + 2²) ≈ 4.47 m long, before adding any overhang.

    Why two values are enough

    A general triangle needs three pieces of information to fix its shape and size. In a right triangle, one of those is already known: the 90° angle. So any two more values pin it down, provided one is a length. Two sides give the third by Pythagoras and the angles by inverse trigonometry. A side and an angle give the other angle immediately, since the two acute angles add up to 90°, and then the remaining sides by sine, cosine or tangent. If you enter three values, they might contradict each other, which is why the calculator asks for exactly two.

    Angles of elevation and depression

    Many practical problems describe angles from a horizontal line. The angle of elevation is measured upwards, for example from the ground to the top of a building. The angle of depression is measured downwards, for example from a cliff top to a boat at sea. Both create a right triangle with the horizontal distance as one leg and the vertical height as the other. Because the horizontal lines at the top and bottom are parallel, the angle of depression from the top equals the angle of elevation from the bottom, which makes these problems straightforward to set up.

    Special right triangles

    TriangleSide ratioNotes
    45°–45°–90°1 : 1 : √2Half of a square, cut along the diagonal
    30°–60°–90°1 : √3 : 2Half of an equilateral triangle
    3–4–53 : 4 : 5Angles about 36.87° and 53.13°

    Knowing these ratios lets you solve many problems without a calculator. For example, in a 30°–60°–90° triangle with a hypotenuse of 10, the short side is 5 and the long side is 5√3 ≈ 8.66.

    Right triangle vs Pythagorean theorem calculator

    A Pythagorean theorem calculator finds one missing side from two sides. This right triangle calculator goes further: it accepts angles as inputs and solves for every side, both acute angles and a full set of properties. Use it whenever an angle is involved, such as angles of elevation, slopes, roof pitches or navigation bearings.

    Where right triangles appear

    Right triangles are everywhere in practical work. Carpenters use them to cut stair stringers and rafters, surveyors use them to measure land and heights they can’t reach directly, and engineers break forces into horizontal and vertical components using sine and cosine. In computer graphics, every point on a screen is placed using right-triangle relationships, and GPS and navigation systems combine many such calculations to find positions and distances.

    Common mistakes

    • Having the calculator or your own device set to radians when you mean degrees.
    • Mixing up the opposite and adjacent sides. They depend on which angle you’re working from.
    • Using sine or cosine on a side that isn’t the hypotenuse. The hypotenuse is always opposite the right angle.
    • Entering three values that don’t agree with each other. Two values are enough to fix a right triangle.
    • Rounding intermediate results too early, which makes later answers drift.

    Related calculations

    Two other tools work well alongside this one: the circle calculator, to find a circle’s radius, diameter, circumference and area, and the area calculator, to find the area of common shapes.

    Frequently asked questions

    You need two values, including at least one side. Use a² + b² = c² for sides, SOH CAH TOA for sides and angles, and A + B = 90° for the other angle.

    Sine = Opposite ÷ Hypotenuse, Cosine = Adjacent ÷ Hypotenuse, and Tangent = Opposite ÷ Adjacent.

    Use an inverse trig function. If you know both legs, A = arctan(a ÷ b). For legs 3 and 4, A ≈ 36.87°.

    No. Angles fix the shape, but you need at least one side length to fix the size.

    Multiply the two legs and halve the result: area = ½ × a × b.

    The perpendicular height from the right angle to the hypotenuse. It equals a × b ÷ c. For a 3-4-5 triangle, it's 2.4.

    The three angles add up to 180°, and one is already 90°, so the other two share the remaining 90°.

    Half the hypotenuse. The hypotenuse is always a diameter of the circle that passes through all three corners.

    Measure your distance from it and the angle of elevation to the top. Height = distance × tan(angle), plus your eye height.

    They're in the ratio 1 : 1 : √2. Legs of 5 give a hypotenuse of about 7.07.

    The radius of the largest circle that fits inside it, equal to (a + b − c) ÷ 2. For a 3-4-5 triangle, it's exactly 1.

    Yes. Sides and angles can be decimals, such as 4.5 or 22.5°.

    Enter angles in degrees. The results show both degrees and radians.