📐

Triangle Calculator

Sides, angles, area & perimeter – SSS, SAS, ASA, AAS, Pythagoras

TL;DR

This calculator solves any triangle completely — just enter any known combination of sides and angles (SSS, SAS, ASA, AAS, or right triangle) and instantly get all missing values. Behind the scenes it applies the Law of Sines, the Law of Cosines, and the Pythagorean theorem depending on what you provide. Area and perimeter are calculated automatically.

Triangle Calculator: Solve Any Triangle Instantly

Whether you're a student tackling geometry homework, an engineer laying out structural plans, or a DIY enthusiast trying to cut the perfect angle for a woodworking project, a reliable triangle calculator is one of the most useful tools you can have at your fingertips. This free online Triangle Calculator solves any triangle — right, acute, or obtuse — given just three known values. Enter three sides (SSS), two sides and an included angle (SAS), or two angles and a side (ASA or AAS), and the calculator instantly returns all missing sides, all angles, the area, and the perimeter. No trigonometry tables, no manual log calculations, and no room for arithmetic errors.

What Makes a Triangle Solvable?

A triangle has six measurements: three sides (a, b, c) and three interior angles (A, B, C). Because the angles of any triangle always sum to 180°, you need at least three independent pieces of information — including at least one side length — to determine the triangle completely. The four classic input combinations supported by this calculator are:

  • SSS – All three side lengths are known.
  • SAS – Two sides and the angle between them are known.
  • ASA – Two angles and the side between them are known.
  • AAS – Two angles and a non-included side are known.

Special cases such as right triangles (where the Pythagorean theorem applies) and isosceles or equilateral triangles are handled automatically. If your inputs describe an impossible triangle — for example, one where the sum of two sides is less than the third — the calculator will alert you immediately instead of returning nonsense values.

Formulas and Methods Used

SSS — Law of Cosines

When all three sides are known, the calculator uses the Law of Cosines to find each angle. The formula is:

cos(A) = (b² + c² − a²) / (2bc)

The same formula is cycled for angles B and C. Once two angles are found, the third is calculated as C = 180° − A − B, providing a built-in accuracy check.

SAS — Law of Cosines (Side-Finding Form)

With two sides and their included angle known, the missing side is found first using the side-finding version of the Law of Cosines:

a² = b² + c² − 2bc · cos(A)

The remaining angles are then resolved with the Law of Sines or the Law of Cosines again for maximum numerical stability.

ASA / AAS — Law of Sines

When two angles are given, the third angle is found immediately (180° minus the sum). Then the Law of Sines finds the unknown sides:

a / sin(A) = b / sin(B) = c / sin(C)

Area — Heron's Formula

Once all three sides are known, the area is calculated using Heron's Formula:

s = (a + b + c) / 2 (semi-perimeter)

Area = √[s(s − a)(s − b)(s − c)]

This elegant formula requires no height measurement and works for any triangle shape. The perimeter is simply P = a + b + c.

How to Use the Triangle Calculator — Step by Step

  • Step 1: Choose your input mode. Select SSS, SAS, ASA, or AAS from the dropdown menu based on which measurements you already have.
  • Step 2: Enter your known values. Type in the side lengths (in any consistent unit — metres, feet, inches, etc.) and angles in degrees. The calculator accepts decimal values for precision work.
  • Step 3: Hit Calculate. The results panel fills in instantly, showing all three sides, all three angles, the total area, and the perimeter.
  • Step 4: Review the diagram. A scaled triangle diagram updates to reflect your inputs visually, helping you catch any data entry mistakes at a glance.
  • Step 5: Reset and recalculate as needed. Use the Reset button to clear all fields and start a new calculation without refreshing the page.

Real-World Examples

Example 1 — Roof Truss Design (SSS)

A carpenter is building a roof truss with three timber lengths: 5 m, 5 m, and 6 m. Entering these as side a = 5, b = 5, c = 6 in SSS mode, the calculator returns angles of approximately 53.13° at the apex and 63.43° at each base corner, an area of 12 m², and a perimeter of 16 m. Knowing the apex angle upfront helps the carpenter pre-cut the ridge board joint accurately without a protractor on-site.

Example 2 — Land Survey (SAS)

A land surveyor measures two boundary lines from a corner post: one is 120 metres, the other is 95 metres, and the angle between them is 72°. Selecting SAS mode and entering these values, the calculator finds the third boundary (the opposing fence line) to be approximately 121.4 metres, with the remaining angles being roughly 49.2° and 58.8°. The enclosed plot area comes to approximately 5 426 m² — equivalent to just over half a hectare — which is essential for property valuation and legal documentation.

Example 3 — Navigation and Bearing (AAS)

A hiker uses a compass to note that two landmarks are visible at bearings of 40° and 95° from her position, forming angles of 55° and 85° at her location relative to the line joining the landmarks. She knows from a map that the two landmarks are exactly 2 km apart. Using AAS mode, the calculator determines her distance to the nearer landmark is approximately 1.64 km and to the farther one is approximately 1.36 km, helping her estimate travel time to either destination.

Frequently Asked Questions

Can I use this calculator for right triangles and the Pythagorean theorem?

Absolutely. Right triangles are simply a special case where one angle is exactly 90°. You can enter them in SAS mode (with the right angle as your known angle), in SSS mode if all three sides are known, or in AAS/ASA mode with 90° as one of the angles. The calculator will confirm the Pythagorean relationship a² + b² = c² and display all values accurately. There is no need to use a separate Pythagorean theorem calculator.

What units does the calculator use, and can I mix metres and feet?

The calculator is unit-agnostic — it works with any consistent unit of length. If you enter sides in centimetres, all output lengths will be in centimetres and the area will be in square centimetres. However, you should never mix units in a single calculation. If your measurements are in different units, convert them all to one unit first. Angles are always in degrees; if you have radians, multiply by 180/π to convert before entering.

Why might the calculator show "no valid triangle" even though I have three values?

Not every combination of three numbers forms a valid triangle. For SSS inputs, the Triangle Inequality Theorem requires that the sum of any two sides must be strictly greater than the third side. For SAS inputs, an angle of 0° or 180° is geometrically impossible. For ASA/AAS inputs, the two given angles must sum to less than 180°. The calculator checks all these conditions and displays a clear error message rather than producing incorrect output. Double-check your measurements — a small typo, such as entering 150 instead of 15, is the most common cause of this error.

Related Calculators

∝ Rule of Three Calculator ⅔ Fraction Calculator △ Area Calculator 🏛️ Roman Numeral Converter