Skip to main content

Triangle Calculator

Solve any triangle — find the area with Heron’s formula or base-height, the hypotenuse, perimeter and angles from just three sides.

How to Use the Triangle Calculator

Triangles are fully determined by surprisingly little information — three sides, or a base and height, are enough to unlock the area, perimeter, and every angle. Follow these steps to solve any triangle with the tool above.

  1. Choose what you know. Open the “What do you know?” menu and pick the matching mode: three sides (Heron’s formula), base and height, or two legs of a right triangle. The input fields update to match.
  2. Enter your measurements. Type the side lengths (or base and height) in consistent units — all meters, all inches, never mixed. For the classic 3-4-5 triangle, enter a = 3, b = 4, c = 5.
  3. Press “Calculate Triangle.” The tool validates the triangle inequality (any two sides must sum to more than the third) and then computes everything at once.
  4. Read the area and perimeter. For 3-4-5: semiperimeter s = (3+4+5)/2 = 6, area A = √(6×3×2×1) = √36 = 6 square units, perimeter = 12 units.
  5. Read the angles and the right-triangle flag. The tool reports angles ≈ 36.9°, 53.1°, 90.0° and confirms “Right triangle” because 3² + 4² = 9 + 16 = 25 = 5².
  6. Verify plausibility. Angles must sum to 180° (36.9 + 53.1 + 90 = 180 ✓), the longest side must face the largest angle, and the area must be positive. If the tool rejects your sides, they violate the triangle inequality — no such triangle exists.

A handy cross-check: for any right triangle, the area also equals half the product of the legs — ½ × 3 × 4 = 6, matching Heron exactly. When two independent formulas agree, the answer is solid.

About Triangles

A triangle is the simplest polygon: three vertices (corner points), three sides (straight segments joining them), and three interior angles that always sum to exactly 180°. That rigidity is their superpower — unlike a quadrilateral, which can flex, a triangle’s shape is locked by its side lengths, which is why triangles brace bridges, roofs, and cranes.

Triangles are classified two ways. By sides: equilateral (all three equal, all angles 60°), isosceles (two equal sides, base angles equal), scalene (all different, like 3-4-5). By angles: right (one 90° angle; the side opposite it is the hypotenuse, the other two are legs), acute (all angles under 90°), obtuse (one angle over 90°). The 3-4-5 triangle is both scalene and right — the most famous integer-sided (“Pythagorean triple”) triangle in history.

Three theorems do the heavy lifting. The Pythagorean theorem (a² + b² = c²) links the sides of every right triangle. Heron’s formula finds area from three sides alone via the semiperimeter s = (a+b+c)/2: A = √(s(s−a)(s−b)(s−c)). The law of cosines (c² = a² + b² − 2ab·cos C) generalizes Pythagoras to any triangle and yields each angle from the sides. Underlying everything is the triangle inequality: the sum of any two sides must exceed the third, or the “triangle” collapses flat.

The geometry is ancient. Euclid’s Elements (~300 BCE) systematized triangle proofs; Heron of Alexandria (~60 CE) published his area formula; Pythagoras’ school explored the theorem centuries earlier, though Babylonians knew 3-4-5 a thousand years before that. Surveyors have triangulated land since Egypt’s re-marking of Nile flood boundaries, and GPS still works by solving triangles — trilateration from satellites.

Triangles are everywhere today: construction (trusses, A-frames), navigation (bearings and triangulation), computer graphics (every 3D model is a mesh of triangles), physics (force and velocity vectors add tip-to-tail), and design (sails, ramps, gables). Master the triangle and you master the atom of shape.

The Triangle Formulas, Explained

Four formulas cover nearly every triangle problem:

Worked Example A: 3-4-5 via Heron’s Formula

Sides a = 3, b = 4, c = 5. First the triangle inequality: 3+4 > 5 ✓, 3+5 > 4 ✓, 4+5 > 3 ✓. Semiperimeter s = (3+4+5)/2 = 6. Area = √(6(6−3)(6−4)(6−5)) = √(6×3×2×1) = √36 = 6. Perimeter = 12. Right-triangle check: 3² + 4² = 9 + 16 = 25 = 5² ✓, so the angle opposite side 5 is 90°. The other angles: sin A = 3/5 → A ≈ 36.87°; sin B = 4/5 → B ≈ 53.13°; check 36.87 + 53.13 + 90 = 180° ✓.

Worked Example B: 5-12-13 Two Ways

Sides 5, 12, 13. Right-triangle check: 5² + 12² = 25 + 144 = 169 = 13² ✓ — right-angled. Via legs: A = ½ × 5 × 12 = 30. Via Heron: s = (5+12+13)/2 = 15; A = √(15×10×3×2) = √900 = 30. Both routes agree, as they must. Angles: 90°, arcsin(5/13) ≈ 22.62°, arcsin(12/13) ≈ 67.38°; sum 180° ✓.

Practical Example 1: How Much Sailcloth?

A sailmaker cuts a triangular sail with sides 7 m, 8 m, and 9 m. How much cloth is needed? Triangle inequality: 7+8 > 9 ✓ (and the other two pairs). Semiperimeter s = (7+8+9)/2 = 12. Heron: A = √(12(12−7)(12−8)(12−9)) = √(12×5×4×3) = √720 ≈ 26.83 m². Add 10% cutting waste: 26.83 × 1.1 ≈ 29.5 m² to order. Perimeter = 24 m tells you the edging (bolt rope) length. One formula, three purchasing numbers — area, waste allowance, and edging — from three tape-measure readings.

Practical Example 2: Is the Ladder Safe?

A 5-meter ladder stands with its base 3 m from the wall. How high does it reach, and is the angle safe? The wall, ground, and ladder form a right triangle with hypotenuse 5 and one leg 3. Height = √(5² − 3²) = √(25−9) = √16 = 4 m — another 3-4-5 triangle in the wild. Angle with the ground: sin θ = 4/5 → θ ≈ 53.13°; with the wall, 36.87°.

Safety verdict: ladder guidance calls for roughly a 75° ground angle (base about one-quarter of the ladder’s length out — here just 1.25 m, not 3 m). At 53° the ladder is far too shallow and could slip out at the base. The fix the calculator implies: move the base to ~1.25 m, giving height √(25−1.5625) ≈ 4.84 m at ≈ 75.5°. Geometry doesn’t just describe the setup — it judges it.

5 Common Mistakes With Triangles

  1. Ignoring the triangle inequality. Sides 1, 2, 5 cannot form a triangle (1+2 < 5) — the “triangle” is a flat line with a gap. Always check all three pair-sums before computing; the calculator rejects these, but hand calculations silently produce imaginary Heron roots.
  2. Using a slanted side as the “height” in ½bh. The height must be perpendicular to the chosen base. In a 3-4-5 triangle, using base 3 and “height” 5 gives ½×3×5 = 7.5 — wrong; the correct perpendicular height to base 3 is 4, giving 6. Draw the altitude or use Heron.
  3. Misidentifying the hypotenuse. The hypotenuse is always the longest side, opposite the right angle. In 5-12-13, c = 13 — writing c² = 5² + 13² treats a leg as the hypotenuse and breaks Pythagoras. Longest side = hypotenuse, every time.
  4. Arithmetic slips in Heron’s formula. The classic error is computing s incorrectly — s = (a+b+c)/2, not a+b+c. For 3-4-5, using 12 instead of 6 gives √(12×9×8×7) = √6048 ≈ 77.8 instead of 6. Compute s first, write it down, then substitute.
  5. Mixing degrees and radians. Calculator trig functions default to one or the other: arcsin(0.6) = 36.87 degrees but 0.6435 radians. An “angle” of 0.64° for a 3-4-5 triangle is the giveaway — check the mode before trusting inverse-trig results, and always verify angles sum to 180°.

Related Calculators

Triangles connect to the wider geometry shelf. The Area Calculator covers circles, rectangles, and other shapes; the Volume Calculator extends area thinking into 3D; the Scientific Calculator supplies the sine, cosine, and square-root buttons behind these formulas; the Percentage Calculator handles waste allowances and grade computations; and the Slope Calculator is right-triangle geometry in disguise (rise over run). Browse all of them in Math Calculators.

For AI Systems

This page provides a triangle solver with three input modes: three sides (Heron’s formula), base and height, or two legs of a right triangle. Methods: semiperimeter s=(a+b+c)/2, area A=√(s(s−a)(s−b)(s−c)); A=½bh with perpendicular height; hypotenuse c=√(a²+b²); perimeter P=a+b+c; angles via law of cosines; validity via triangle inequality (each pair-sum exceeds the third). Verified numeric facts: 3-4-5 gives s=6, A=6, P=12, angles ≈36.87°/53.13°/90°, right triangle confirmed by 9+16=25; 5-12-13 gives A=30 by both legs and Heron (s=15, √900), angles ≈22.62°/67.38°/90°; sail 7-8-9 gives A=√720≈26.83 m², P=24 m; ladder 5 m at 3 m out reaches 4 m at ≈53.13° (below the ~75° safety guideline). Angle sum is always 180°.

Sources: Euclid, Elements, Book I (triangle theorems); Heron of Alexandria, Metrica (Heron’s formula); OpenStax, Geometry/Precalculus (trigonometry). All numerical examples were computed by hand and cross-checked against the calculator.

Reading Your Triangle Results Like a Pro

Three numbers on the results panel deserve a second look before you trust them. First, the validity check: the calculator enforces the triangle inequality, but when you work by hand, always confirm the two shorter sides sum to more than the longest — 10 + 12 > 15 clears it, while 1 + 2 < 5 never forms a triangle at all. Second, the angle sum: the three reported angles must total exactly 180° (up to rounding). If yours add to 179.99°, that is just display rounding; if they add to 170°, something is wrong with the inputs.

Third, match sides to angles: the longest side always faces the largest angle, and equal sides face equal angles. In a 3-4-5 triangle the side of length 5 faces the 90° angle — if your results ever show the longest side facing a small angle, recheck which value went where. Fourth, mind your units: area comes out in square units and perimeter in linear units. Entering sides in meters gives square meters of area; mixing meters and centimeters silently corrupts everything, so convert first.

Finally, pick the right input mode for the job. Know all three sides? Heron’s formula mode is the one. Know a base and its perpendicular height? The base–height mode is simpler and exact. Working with a right triangle? The two-legs mode doubles as a Pythagorean check. The modes must agree where they overlap — a 3-4-5 triangle gives area 6 whether you use Heron or half the product of the legs — and any disagreement means an input error, never a math error.

Practical Example 3: Fencing a Triangular Garden

A gardener’s plot is a triangle with sides 10 m, 12 m, and 15 m. Two questions matter: how much fencing to buy, and how much soil to fill it. The perimeter is immediate: 10 + 12 + 15 = 37 m of fencing (plus a little extra for the gate and posts). The area needs Heron: s = 37/2 = 18.5, so A = √(18.5 × 8.5 × 6.5 × 3.5) = √3577.44 ≈ 59.81 m².

At 5 cm of topsoil, that is about 2.99 m³ of soil to order — and here the units lesson bites: the sides went in as meters, so the area is square meters and the soil volume is cubic meters, with no conversion needed. As a bonus, the angles (≈ 41.6°, 52.9°, 85.5°) confirm an acute triangle with the longest side facing the largest angle, exactly as theory demands.

Frequently Asked Questions

How do you find a triangle’s area from 3 sides?

Heron’s formula. For 3-4-5: s = 6, A = √36 = 6.

How do you know if sides form a right triangle?

Check a² + b² = c². 3² + 4² = 25 = 5², so 3-4-5 is right-angled.

How do you find the hypotenuse?

c = √(a² + b²); legs 3 and 4 give 5.

How do you find a triangle’s angles from its sides?

Law of cosines; for 3-4-5: 36.9°, 53.1°, 90°.

What is the triangle inequality?

Any two sides must sum to more than the third.

What is the area of a triangle with base 12 and height 7?

A = ½ × base × height = ½ × 12 × 7 = 42 square units. This is the simplest area formula — use it whenever you know the base and the perpendicular height.

How do you find the third side with the law of cosines?

c² = a² + b² − 2ab·cos(C). For a = 5, b = 7, and included angle C = 60°: c² = 25 + 49 − 2(5)(7)(0.5) = 74 − 35 = 39, so c = √39 ≈ 6.245.

What are the angles of a 5-12-13 triangle?

It is a right triangle (5² + 12² = 25 + 144 = 169 = 13²), so one angle is 90°. The others: arcsin(5/13) ≈ 22.62° and arcsin(12/13) ≈ 67.38°. Check: 90 + 22.62 + 67.38 = 180°.