A triangle is the simplest closed shape there is, yet the moment you need a missing side, a missing angle, the area or the perimeter, the arithmetic can turn into a page of square roots and inverse cosine functions. The Triangle Calculator removes that friction: it solves a triangle from the measurements you already have and returns the area, the perimeter and all three interior angles instantly. This guide explains exactly what the calculator does, which formulas it uses, and how to interpret the results for real jobs — homework, roof lines, land plots, framing and everything in between.
What a Triangle Needs
Every triangle is fully determined by three pieces of information, provided at least one of them is a side length. Three angles alone are never enough: an equilateral triangle shows why, because scaling it up multiplies every side and every area without changing a single angle. In practice you usually know either all three sides (side-side-side, or SSS), two sides plus the angle between them (side-angle-side, or SAS), a side plus two adjacent angles (angle-side-angle), or a base and a height. This calculator focuses on the two cleanest and most common cases: solving from three sides, and computing the area from a base and a height treated as the legs of a right triangle.
How to Use the Calculator
The segmented control at the top switches between the two solving modes. Both modes are fully independent, so the values you enter in one never disturb the other.
- Three sides (SSS) — set side a, side b and side c with the three sliders. The calculator immediately returns the area via Heron's formula, the perimeter as the sum of the three sides, and all three interior angles via the law of cosines.
- Base & height — set a base and a height. The calculator returns the area as half the product, the perimeter of the right triangle that the base and height describe, and the three angles of that right triangle, including the fixed 90 degree corner.
The sliders run from 1 to 200, and every result updates live as you drag them. The default inputs of 8, 6 and 10 form the famous 8-6-10 right triangle, so the very first load already demonstrates a triangle with a perfect 90 degree corner: angle C reads exactly 90 degrees and the area comes out to 24 square units.
The Three Sides Mode in Detail
Given three side lengths, a good calculator does not need any angle input at all. The area follows from Heron's formula, named after the Greek engineer Hero of Alexandria. Compute the semiperimeter s, exactly half of the total perimeter, then multiply four factors and take the square root:
A = √(s·(s−a)·(s−b)·(s−c)) where s = (a + b + c) / 2
For the default 8, 6, 10 triangle the semiperimeter is 12, and the multiplication 12 × 4 × 6 × 2 gives 576, whose square root is exactly 24. Heron's formula is the most robust way to get an area from sides alone because it makes no assumption about which angle is obtuse or acute.
Finding the Angles from Three Sides
The three interior angles come from the law of cosines, the natural generalization of the Pythagorean theorem. For any triangle with sides a, b and c, the angle C opposite side c satisfies:
cos(C) = (a² + b² − c²) / (2ab)
Inverting that relationship with the inverse cosine function gives the angle in radians, and multiplying by 180/π converts it to degrees. The calculator applies the same rule at all three corners, so you get angle A, angle B and angle C without ever measuring a protractor. For the 8, 6, 10 default, the angle opposite side 6 works out to about 36.9 degrees and the angle opposite side 8 to about 53.1 degrees — the same proportions as the classic 3-4-5 triangle scaled up by a factor of two, and the three angles always sum to 180.
Why the Law of Cosines Is Related to Pythagoras
The law of cosines contains the Pythagorean theorem as a special case. When the included angle is exactly 90 degrees, its cosine is zero and the correction term −2ab·cos(C) vanishes, leaving c² = a² + b². That is precisely the Pythagorean relationship you already know from the Pythagorean theorem calculator. For right triangles the two tools arrive at identical answers, so you can use them to cross-check each other. For oblique triangles, the cosine correction is what makes the geometry work correctly, which is why a dedicated right triangle calculator stays a separate, simpler tool.
The Base and Height Mode
Sometimes you do not know the three sides at all — you know the base of a shape and how tall it stands. The area of any triangle is then simply half the base times the height:
A = b × h / 2
That single rule covers floors, wall sections, gables and hatched plans. With the default base of 5 and height of 6 the area is 15 square units, which is real land or real material regardless of how the triangle is tilted on the page. This mode additionally treats the base and height as the two legs of a right triangle so it can keep reporting a perimeter and angles: the third side is the square root of the sum of the squares, and the two acute angles are the arctangent of the ratio and its complement to 90 degrees. If you only need the area this extra detail is harmless; if you need a fully general solver with any three measurements, the three-sides mode covers the exact case.
Perimeter of the Triangle
The perimeter is the sum of all three side lengths — the total length of the fence you would use to enclose the triangle, or the total run of trim around its edge. In three-sides mode it is just a plus b plus c, so the default triangle has a perimeter of 24 units. In base and height mode the perimeter adds the derived hypotenuse, so the 5-6 triangle runs 5 plus 6 plus roughly 7.81, about 18.81 units. Because the third side is derived rather than guessed, the perimeter is always geometrically consistent with the inputs. When you scale a triangle up by any factor, the perimeter scales by exactly the same factor, which is the property contractors rely on when they move from a drawing to a full-size build.
The Triangle Inequality
Not every trio of numbers can become a triangle. The triangle inequality states that each side must be strictly smaller than the sum of the other two; otherwise the two short sides would never reach each other. Sides of 2, 3 and 9 are impossible, no matter how hard you pull. The calculator handles this defensively by clamping the area calculation at zero, so an invalid triple shows a zero area instead of an error or a mysterious square root of a negative number. If you see a zero area, the first thing to check is whether your three lengths can actually connect.
Angles Always Sum to 180 Degrees
Every triangle's three interior angles add up to exactly 180 degrees, a fact with a simple proof: draw a line parallel to one side through the opposite vertex and the alternate angles fold together into a straight line. This single rule is the most powerful sanity check in triangle work. Once the calculator has recovered two angles from the law of cosines, the third is forced — and the calculator still derives it independently from the sides, so a well-formed triangle always shows the three angles summing to 180 within rounding. In base and height mode the right angle contributes 90 and the two acute angles share the remaining 90 between them.
Real-World Applications
Triangle math shows up far beyond the classroom. Roofers model every rafter as a triangle whose run is half the building width and whose rise sets the pitch; the rafter length is the hypotenuse, and the area helps order sheathing. Surveyors split irregular land parcels into triangles because a triangle is the only polygon whose shape is fixed once its sides are fixed. Gardeners and landscapers compute triangular bed areas for mulch and sod. Drafters and CNC programmers convert three point coordinates into angles and lengths many times per day. Even a simple ladder against a wall is a right triangle whose hypotenuse is the ladder itself, so the same formulas you run here decide real safety limits. The Area Calculator and the Distance Calculator are built on the same geometric foundations.
How the Numbers Should Read
A quick walkthrough of the default state ties every output together. With side a equal to 8, side b equal to 6 and side c equal to 10, the triangle is a right triangle scaled from the classic 3-4-5. The area comes out to exactly 24 square units, the perimeter to 24 units, and the three angles to about 53.1, 36.9 and 90 degrees. In base and height mode the default base of 5 and height of 6 produce an area of 15 square units and a right triangle with an 18.81 unit perimeter. Both sets of numbers are consistent enough to use directly on a job site, and both can be reproduced on paper in a minute when you need to double-check a critical measurement.
Common Mistakes
- Assuming all three sides must be known to find the area — the base-and-height mode covers triangles in two numbers.
- Forgetting the semiperimeter in Heron's formula: it is half the perimeter, not the full perimeter.
- Entering impossible lengths such as 2, 3 and 9 that violate the triangle inequality, then wondering why the result looks broken.
- Mixing units within one triangle — all three sides must be in the same unit, whether inches, feet, meters or chains.
- Reading the angle opposite the wrong side: angle A always faces side a, angle B faces side b and angle C faces side c.
- Expecting the area of a scaled-up triangle to scale up too: doubling the sides quadruples the area, because area is a squared quantity.
Key Assumptions
- Three-sides mode requires a real triangle satisfying the triangle inequality.
- Base-and-height mode interprets the inputs as the two perpendicular legs of a right triangle.
- All angles are reported in degrees and all lengths in whatever single unit you choose.
- Results are rounded for display but computed with full precision underneath.
Whether you are solving a homework problem, sizing a rafter or checking a survey, this calculator turns three measurements into the complete geometry of the triangle. Enter what you know, read what you need, and keep the law of cosines, Heron's formula and the 180-degree rule in mind as the reasoning behind every result.
Disclaimer
Results are provided as estimates for informational purposes only and may be inaccurate. Always verify outcomes with a qualified professional before making financial or personal decisions based on these calculations.