Solve a SAS triangle with the law of cosines — get side c, both angles, area and perimeter, with every step shown, free in your browser.

Triangle Calculator

Solve a triangle from two sides and their included angle — third side, both angles, area and perimeter in one run.

Free to use Full SAS solution Angles, area & perimeter Save PDF · PNG · Share

Enter your values

Fill in the fields below — the result appears with every step shown.

Shown on the printed, PDF and PNG copies of your result. Leave blank to stay anonymous.

units

Enter a valid value for side a.

units

Enter a valid value for side b.

degrees

Enter a valid value for included angle c.

Angle between sides a and b.

Local browser calculation

Review your inputs and the tool’s supported scope before using the result.

Calculator loading… If this message stays, this view is not running the calculator's script — open this file in a full browser tab, then press Calculate.

Your result will appear here

Enter your values above, then press Calculate — or press Enter in any field.
TinyExe Triangle Calculator tinyexe.comFree online calculators

TinyExe · Triangle Result

Calculated locally in your browser

Calculated on
—

–
—

Name

—

Side a

—

Side b

—

Included angle C

—

How this was calculated

    What to do next

      TinyExe · tinyexe.com — Runs 100% in your browser — your numbers never leave this tab; nothing is uploaded or stored.

      TinyExe PDF & PNG exports carry the TinyExe logo and tinyexe.com header & footer.

      Runs 100% in your browser — your numbers never leave this tab; nothing is uploaded or stored.

      Embed this tool

      Add this Triangle Calculator to your own page — copy the code below and paste it where you want the tool to appear.

      The embed loads the live calculator in a frame, so it stays up to date automatically. Choose a width, check the code, then copy it. When you publish on WordPress, keep the src pointing at your live tool URL.

      Works in WordPress (Custom HTML block), HTML pages, and most site builders.

      The short answer

      Enter two sides and the angle between them and this triangle calculator applies the law of cosines, c squared equals a squared plus b squared minus two a b cos C, to find the third side, then derives both remaining angles, the area from half a b sin C, and the full perimeter instantly.

      • Law of cosines: c^2 = a^2 + b^2 - 2ab cos(C)
      • Area = (1/2)ab sin(C)
      • Interior angles always sum to 180 degrees

      Useful triangle facts

      Reference values for this calculator.

      CaseRuleResult
      Right, C=90c^2=a^2+b^2Hypotenuse
      EquilateralAll angles 60 degAll sides equal
      Obtuse C>90cos(C) negativec longer than Pythagoras
      Any triangleA+B+C180 degrees

      The formula

      The exact formula this calculator uses — every variable in it is explained in the card below.

      The formula

      Law of cosines: c^2 = a^2 + b^2 - 2ab cos(C); Area = (1/2)ab sin(C); angles from the law of cosines and A+B+C = 180 degrees

      Solves a SAS triangle completely: third side, both remaining angles, area and perimeter. Enhancement: also reports the angle check A+B+C=180 so a mistyped included angle is easy to spot.

      Worked examples

      Worked examples with the full working shown — try them in the calculator to check.

      Example 1

      The classic 3-4-5

      a=3, b=4, C=90 degrees

      CalculationSteps
      c^2 = 9 + 16 - 0 = 25, so c = 5. Area = 0.5 x 3 x 4 x 1 = 6.Side c = 5, area 6, angles 36.87, 53.13 and 90 degrees.

      Result

      Example 2

      Two equal sides at 60 degrees

      a=5, b=5, C=60 degrees

      CalculationSteps
      c^2 = 25 + 25 - 50 x 0.5 = 25, so c = 5.Side c = 5 — the triangle is equilateral, area about 10.83.

      Result

      Example 3

      An obtuse layout

      a=6, b=8, C=120 degrees

      CalculationSteps
      c^2 = 36 + 64 - 96 x (-0.5) = 148, so c = 12.1655.Side c = 12.1655, longer than the 10 Pythagoras would suggest, because C is obtuse.

      Result

      How to use this calculator

      Step 1

      Enter side a and side b, the two sides that form the included angle.

      Step 2

      Enter angle C in degrees, strictly between 0 and 180.

      Step 3

      Read side c as the headline result from the law of cosines.

      Step 4

      Check angles A and B and the area in the details.

      Step 5

      Confirm A+B+C equals 180 degrees as a sanity check.

      In short: A triangle solver finds unknown sides and angles of a triangle from the parts that are known, using trigonometry.

      Frequently asked questions

      What does SAS mean?

      Side-Angle-Side: two sides and the angle included between them, which is exactly what this calculator takes. That data determines a unique triangle.

      Can angle C be 180 degrees?

      No. At 180 degrees the two sides lie on a straight line and there is no triangle; C must be greater than 0 and less than 180.

      How is the area calculated?

      Area = (1/2) x a x b x sin(C). This works for any triangle when two sides and their included angle are known, not just right triangles.

      Why do the angles add to 180?

      The interior angles of any Euclidean (flat-plane) triangle always sum to exactly 180 degrees, which this calculator uses to find the final angle.

      Does this solve SSS or ASA triangles?

      This version is scoped to the SAS case. For three known sides use repeated law-of-cosines steps, and for two angles and a side use the law of sines.

      About this calculator

      A triangle calculator solves a triangle: given some sides and angles, it works out all the rest. This version takes the SAS case — sides a and b with their included angle C — and returns side c, angles A and B, the area and the perimeter.

      The law of cosines generalises Pythagoras. When C is exactly 90 degrees, cos(C) is zero and c^2 = a^2 + b^2, the familiar right-triangle rule. For acute or obtuse angles the correction term -2ab cos(C) shortens or lengthens c, which is why the same formula handles every SAS triangle.

      Once c is known, the remaining angles follow from the law of cosines applied again, and the last angle is simply 180 minus the other two. The area needs no height measurement: half the product of the two known sides times sin(C) gives it directly, which surveyors use when a plot corner angle is known but a perpendicular offset is not.

      Use it for carpentry and roof pitch layouts, land and surveying sketches, navigation legs, physics force triangles, and any school or engineering problem where two sides meet at a known angle and the distance across from that angle is needed.

      How to calculate it yourself

      Step 1

      Write down sides a and b and the included angle C in degrees.

      Step 2

      Square both sides and add them: a^2 + b^2.

      Step 3

      Subtract 2ab cos(C) and take the square root to get c.

      Step 4

      Use the law of cosines again for angle A, then B = 180 - A - C.

      Step 5

      Find the area as (1/2)ab sin(C) and add a+b+c for the perimeter.

      Real-life examples

      Bracing a garden gate

      A gate frame has rails of 0.9 m and 1.2 m meeting at a right angle and the builder needs the diagonal brace length.

      c = sqrt(0.9^2 + 1.2^2) = sqrt(0.81 + 1.44) = sqrt(2.25) = 1.5 m.

      Cut the diagonal brace at 1.5 m before allowing for fixings.

      Measuring across a pond corner

      Two straight banks of 40 m and 55 m meet at 70 degrees and a ranger needs the distance straight across the corner.

      c^2 = 1600 + 3025 - 2 x 40 x 55 x cos70 = 4625 - 1504.9 = 3120.1, so c = 55.86 m.

      The straight-line distance across the corner is about 55.9 m, much less than walking 95 m around.

      Ideas & use cases

      • Roof work: enter the two sloping members and their meeting angle to get the span you must bridge.
      • Land plots: run each surveyed corner as an SAS triangle to build up a plot area piece by piece.
      • What-if check: vary angle C by a degree or two to see how sensitive the closing side is to a measurement error.

      Limitations & sources

      • Scoped to the SAS case (two sides + included angle) on a flat plane; it does not solve SSS, ASA or spherical triangles.

      Sources: Law of cosines and law of sines: standard trigonometry (OpenStax Precalculus, Triangle chapter); calculator.net triangle calculator behaviour cross-checked

      Triangle Calculator · TinyExe calculator suite Free to use · No sign-up · Instant results