How to Use the Calculator
- Use one length unit. All three sides might be in centimeters, meters, or feet, for example. The calculator does not convert units.
- Enter Side a, Side b, and Side c. The order doesn't affect the area or semiperimeter.
- Read the results. Triangle area is the main result, and Semiperimeter appears as the secondary result.
- Check the Worked steps. This panel is open by default and shows how the results were calculated.
The calculator starts with a 3–4–5 right triangle. The Example triangles selector also offers a 13–14–15 triangle, and it switches to Custom triangle when you edit a side.
Entry limits
Each side must be from 0.000001 to 1,000,000,000, inclusive, with up to 30 significant digits and 80 characters. You can type decimals or scientific notation, such as 2.5e3 for 2,500.
The sliders initially run from 0.1 to 20 in steps of 0.1. Type a value directly if you need finer precision or a length below 0.1. Entering a valid value above a slider's range extends its upper limit.
Heron's Formula and Its Variables
For a triangle with side lengths , , and , Heron's formula is:
| Symbol | Meaning |
|---|---|
| The three side lengths, in the same unit | |
| The semiperimeter | |
| The area, in square units |
The expression under the square root is called the radicand. It is the product of four numbers: , , , and .
The formula is named after Hero (or Heron) of Alexandria, who presented it in his work Metrica in the first century AD.
Semi-Perimeter of a Triangle Formula
The perimeter is the total length of the three sides:
The semiperimeter is half of that total:
For sides 13, 14, and 15:
The semiperimeter is a length, not an area. If the sides are in meters, is also in meters.
Area of a Triangle with 3 Sides Using Heron's Formula
To calculate the area by hand, find the semiperimeter, subtract each side from it, multiply the four values, and take the positive square root.
Example: 13–14–15 triangle
Let , , and . As found above, .
The three differences are:
Substitute them into the formula:
The area is 84 square units. The number under the square root, 7,056, is not the area. You must take its square root.
Example with a rounded square root
For sides 5, 6, and 7, the semiperimeter is 9:
The area is approximately 14.69694 square units. When calculating by hand, keep extra digits until the final step to limit rounding error.
Understanding Your Results
Area units
The calculator labels lengths as units and area as units². Replace “units” with the unit you used. Sides of 3, 4, and 5 cm give a semiperimeter of 6 cm and an area of 6 cm².
Convert mixed measurements before entering them. For sides of 1.2 m, 90 cm, and 150 cm, change 1.2 m to 120 cm. Entering 120, 90, and 150 gives an area of 5,400 cm², which equals 0.54 m².
Exact and rounded values
In the worked steps, = marks an exact displayed relationship, while ≈ marks a rounded one. Results and intermediate values are shown to up to seven significant digits, using scientific notation where applicable.
The semiperimeter, differences, and radicand are calculated with exact decimal arithmetic. The radicand is then converted to a double-precision number to take the square root, so a displayed area can be an approximation.
The number of digits displayed is separate from the number you can enter. A value shown as rounded does not mean your input was shortened to seven digits.
Triangle diagram
The shaded diagram updates with your inputs. It places the longest side at the base, although very close lengths can tie at the diagram’s drawing precision. It keeps the original labels a, b, and c, so any of them can label the base. You can zoom and pan without changing any measurements or results.
When Do Three Sides Form a Triangle?
The two shorter sides must add up to strictly more than the longest side. This rule is called the triangle inequality.
| Sides | Comparison | Result |
|---|---|---|
| 3, 4, 5 | Valid triangle | |
| 3, 4, 7 | Invalid: flat, with zero area | |
| 3, 4, 8 | Invalid: the sides cannot meet |
The calculator checks this rule using exact decimal arithmetic. For example, it recognizes that 0.1 + 0.2 equals 0.3 exactly, so those three lengths do not form a triangle.
For invalid input, an error appears, numeric results change to em dashes, and the worked steps and diagram become unavailable. Copy and export are also disabled. Check for a mistyped value, mixed units, a length outside the entry limits, or sides that fail the triangle inequality.
Very Thin Triangles and Measurement Sensitivity
A triangle can be valid but nearly flat. Its area may then change noticeably after a small change in one side.
| Sides | Area in square units |
|---|---|
| 3, 4, 6.999 | ≈ 0.2049018 |
| 3, 4, 6.998 | ≈ 0.2897223 |
Here, changing the longest side by only 0.001 increases the area by about 41%.
The calculator shows a Very thin triangle advisory when the following gap is positive and strictly less than 0.001 times the longest side:
The advisory does not mean the triangle is invalid. Keep extra measurement digits, and remember that more typed digits do not make the original measurement more accurate.
Rounding can also hide a very small difference. If the longest side is entered as 6.9999999999999999 with sides 3 and 4, the actual semiperimeter is 6.99999999999999995. The worked steps show it as ≈ 7, but the triangle still has a positive area, displayed as 6.480741e-8 square units. The notation e-8 means “multiplied by .” Rounding both the semiperimeter and the longest side to 7 before recalculating would incorrectly give zero.
How to Verify the Area
Check a right triangle
If the side lengths satisfy , the triangle is right-angled, with and as its perpendicular sides. For the 3–4–5 triangle:
This agrees with Heron's formula:
Check with base and height
If you independently know the height perpendicular to a chosen side, use:
The 13–14–15 triangle has a height of 12 when the side of length 14 is the base. Therefore, its area is , matching the earlier result.
A height calculated from the Heron area, using , is not an independent check.
Why Heron's Formula Works
The usual area formula needs a height, but the three side lengths already determine that height. If is the angle between sides and , then:
The law of cosines expresses the angle using only the sides:
Combining these with and factoring gives:
The four factors on the right equal , , , and . Dividing by 16 and taking the positive square root gives Heron's formula.
Copy, Export, and Reset
- Copy copies the side lengths and results.
- Export opens the print dialog, where you can also save the result as a PDF.
- Reset restores the 3–4–5 example, reopens Worked steps, and resets the diagram view.
- Help explains entry limits, units, calculations, the diagram, and thin triangles.
Frequently Asked Questions
Can Heron's formula be used for any triangle?
It works for any valid flat (Euclidean) triangle, including acute, right, obtuse, scalene, isosceles, and equilateral triangles. It does not apply unchanged to triangles drawn on curved surfaces such as a sphere.
Do I need to know an angle or the height?
No. The three side lengths are enough to find the area. If you have only two sides, you need more information, such as the angle between them.
Does it matter which side I call a, b, or c?
No. Reordering the sides changes their labels and the order of the factors, but not the area or semiperimeter.
Why is my area in square units?
Area measures the surface inside the triangle. The four factors under the square root are all lengths, so their product has units to the fourth power. Taking the square root gives square units.
Read the formula definitions, supported input ranges, and limitations before using this estimate.