SAS Triangle Calculator - Two Sides and the Included Angle
Use this SAS triangle calculator to recover the third side, the two unknown angles, the area, and the perimeter from two sides and the included angle.
SAS Triangle Calculator
Results
What Is an SAS Triangle Calculator?
An SAS triangle calculator solves a triangle when you know two sides and the angle between them. You enter the two adjacent side lengths and the included angle gamma, and the tool returns the third side c, the two missing angles alpha and beta, the area, and the perimeter using the law of cosines, the law of sines, and the angle sum.
- • Surveying a plot: Walk two measured legs from a corner, take the included angle, and recover the third side so you can compute the plot's area and perimeter.
- • Roof and truss layout: Translate two known rafter lengths and the ridge angle into the rafter-pair base, the other two angles, and the roof area.
- • Navigation and bearings: Use two measured legs of a course and the bearing between them to find the straight-line distance back to the start.
- • Verifying a homework problem: Cross-check that your law of cosines and law of sines work return the same answer as the SAS step-by-step in your textbook.
SAS stands for Side-Angle-Side. The two known sides must sit on the rays of the known angle; the angle is the included angle, not the angle opposite a known side. Once gamma is fixed, the configuration has only one valid triangle, so all of the other sides, angles, and area values are unique. Pick the length unit you want to display (cm, mm, m, in, or ft) and the side, perimeter, and area labels follow.
When the included data swaps from side-angle-side to angle-side-angle, ASA triangle calculator works the same way and returns the third angle instead of the third side first.
How the SAS Triangle Calculator Works
The calculator first uses the law of cosines to recover the third side from the two known sides and the included angle, then uses the law of sines together with the angle sum to recover the two missing angles, and finishes with the half-base-times-height area formula and a perimeter sum.
- a, b: The two known sides. They share the vertex at the included angle gamma.
- gamma: The included angle, in degrees, between sides a and b. Must satisfy 0 < gamma < 180.
- c: The third side, opposite gamma, recovered by the law of cosines.
- alpha, beta: The two missing angles, opposite a and b respectively, recovered by the law of sines and the angle sum.
- Area, P: Area from 0.5 a b sin(gamma) and perimeter from a + b + c.
The law of cosines generalizes the Pythagorean theorem to non-right triangles. When gamma is exactly 90 deg, cos(gamma) is 0 and the law collapses to c = sqrt(a^2 + b^2).
Omni worked example: a = 4 cm, b = 3 cm, gamma = 42 deg
Side a = 4 cm, side b = 3 cm, included angle gamma = 42 deg
c = sqrt(4^2 + 3^2 - 2*4*3*cos(42 deg)) = sqrt(16 + 9 - 24*0.7431) = sqrt(7.165) = 2.68 cm
Side c = 2.68 cm, alpha = 89.41 deg, beta = 48.59 deg, area = 4.01 sq cm, perimeter = 9.68 cm
This matches the Omni Calculator SAS triangle example. Alpha is close to 90 deg because side a is much longer than side c, so the triangle is almost right-angled at the alpha vertex.
According to Wikipedia, Law of cosines, the law of cosines relates the three sides of a triangle to the cosine of one of its angles as c^2 = a^2 + b^2 - 2ab cos gamma, and it generalizes the Pythagorean theorem to non-right triangles
When the included angle gamma is exactly 90 deg, the law of cosines collapses to the Pythagorean theorem and right triangle calculator gives you the same answer through the specialized Pythagorean shortcut.
Key Concepts Behind SAS Triangle Solving
These four ideas cover what makes an SAS case different from AAA, ASA, or SSS.
Included angle is the key
SAS only works when the known angle is the one between the two known sides. If the angle sits at a vertex where only one known side touches it, you have an SSA (ambiguous) case.
Law of cosines
The law of cosines relates all three sides to a single angle: c^2 = a^2 + b^2 - 2ab cos(gamma). When gamma equals 90 deg it reduces to c^2 = a^2 + b^2.
Law of sines and the angle sum
Once c is known, the law of sines (a / sin(alpha) = c / sin(gamma)) gives sin(alpha), and arcsin turns that into the angle alpha. Beta is 180 - alpha - gamma.
Area from two sides and the included angle
Half the product of the two known sides times the sine of the included angle (0.5 * a * b * sin(gamma)) gives the area directly. This is the same as base times height, where the height is b sin(gamma).
These four pieces turn an SAS problem into a short sequence of mechanical steps. The included angle is the input that does the heavy lifting, the law of cosines recovers the missing side, the law of sines plus the angle sum recover the missing angles, and the half-base-times-height formula gives the area.
If you have a different set of known sides and angles, the general triangle calculator covers the SSS, SAS, ASA, and AAS cases in one tool and helps you pick the right identity before you start.
How to Use This SAS Triangle Calculator
The result panel updates as you type, so you can treat the form as a scratch pad.
- 1 Enter side a: Type the length of the first side. Use a positive number and pick a unit that matches the rest of the problem (cm, mm, m, in, or ft).
- 2 Enter side b: Type the length of the second side, using the same length unit as side a.
- 3 Enter the included angle gamma: Type gamma in degrees, strictly between 0 and 180. This is the angle at the vertex where sides a and b meet, not any other angle in the triangle.
- 4 Pick a length unit label: Choose the length unit (cm, mm, m, in, or ft) you want shown next to side c, the perimeter, and the area. The label changes only the displayed text, not the calculation.
- 5 Read the third side c: Confirm that side c is positive. If c is zero or NaN, the included angle and side lengths are inconsistent and the form shows a validation error.
- 6 Read alpha, beta, the area, and the perimeter: Use alpha and beta for the triangle's other angles, the area for surface or material estimates, and the perimeter for trim, fencing, or framing totals.
For a shed roof with rafters of 3 m and 4 m that meet at a 60 deg ridge angle, enter a = 3, b = 4, gamma = 60. The calculator returns c = 3.61 m, alpha = 46.10 deg, beta = 73.90 deg, area = 5.20 sq m, perimeter = 10.61 m. Use the area to order sheathing and the perimeter to plan the eave trim.
For AAS-style problems where the known side is not between the two known angles, triangle length calculator applies the law of sines in a different order to reach the same final side lengths.
Benefits of Using the SAS Triangle Calculator
Working through SAS by hand is fine for one problem, but the calculator removes a few classes of error that show up when you have to do it repeatedly.
- • One pass, six outputs: Side c, alpha, beta, the area, the perimeter, and the unit labels all come out of the same input, so you never have to chase a missing value through a chain of formulas.
- • Avoids the SSA ambiguity: The included-angle input forces a unique configuration. The calculator catches you if you try to put the angle in the wrong place.
- • Catches impossible inputs early: If gamma falls outside (0, 180) or a side length is zero or negative, the form shows a validation error before any trigonometry runs.
- • Real-time updates for scratch work: The result panel refreshes on every keystroke, so you can sweep gamma from 1 deg to 179 deg and watch the triangle flatten and invert.
- • Unit-agnostic by design: Sides, perimeter, and area are all returned in the unit you entered, so you can switch between cm, m, in, and ft without re-doing the math.
These benefits matter most when the input data comes from a real measurement rather than a textbook.
Once you have all three sides, the triangle area calculator cross-checks the SAS area with Heron's formula so you can confirm the answer with an independent identity.
Factors That Affect SAS Triangle Results
Four things change the numbers the calculator returns, and the limitations below describe what the law of cosines does and does not cover.
Size of the included angle gamma
Smaller gamma makes side c shorter because cos(gamma) is larger and subtracts more from a^2 + b^2. Larger gamma makes side c longer, up to a + b when gamma = 180 deg.
Ratio of sides a and b
Swapping a and b swaps the alpha and beta angles, but it does not change side c or the area. The shape only depends on the included angle and the relative size of the two sides.
Numerical precision of gamma
Side c is sensitive to gamma near 0 deg and 180 deg because cos(gamma) is changing fastest there.
Choice of length unit
The calculator does not convert units. If you type a = 3 and b = 4 in mixed units (cm and in), the result will be in those same mixed units.
- • The law of cosines only applies to planar Euclidean triangles. It does not solve spherical triangles (for example, great-circle navigation on a globe).
- • When gamma is very close to 0 deg or 180 deg, floating-point rounding can leave side c with a tiny imaginary component. The calculator flags the input as invalid if the squared value goes non-positive.
These factors are why the calculator asks you to confirm the length unit and to keep gamma strictly between 0 and 180 deg.
According to Omni Calculator, SAS triangle, two adjacent sides and the included angle are enough to uniquely define a triangle, and the missing side, the two missing angles, the area, and the perimeter can be computed with the law of cosines, the law of sines, and the angle sum
If gamma is given in gradians or radians instead of degrees, angle converter converts the value before you enter it into the SAS triangle calculator.
Frequently Asked Questions
Q: What is a SAS triangle?
A: A SAS triangle is a triangle in which two sides and the angle between them are known. The acronym stands for Side-Angle-Side, and the known angle must be the included angle, sitting at the vertex where the two known sides meet, not the angle opposite a known side.
Q: How do you solve a SAS triangle step by step?
A: Apply the law of cosines with the two known sides and the included angle to get the third side, then use the law of sines to recover one of the missing angles from a known side-angle pair. Subtract the two known angles from 180 to get the last angle, and use 0.5 times the product of the known sides times the sine of the included angle for the area.
Q: What is the formula for the area of a SAS triangle?
A: The area of a SAS triangle is 0.5 * a * b * sin(gamma), where a and b are the two known sides and gamma is the included angle. This is the same as base times height, with the height equal to b sin(gamma).
Q: How is the law of cosines used in a SAS triangle?
A: The law of cosines, c^2 = a^2 + b^2 - 2ab cos(gamma), recovers the third side c from the two known sides a and b and the included angle gamma. When gamma is 90 deg, the cosine term is zero and the law reduces to the Pythagorean theorem, c^2 = a^2 + b^2.
Q: What is the difference between SAS and SSA triangles?
A: In a SAS triangle the known angle sits between the two known sides, so the configuration is unique. In an SSA triangle the known angle is opposite a known side, which can yield two valid triangles (the ambiguous case) or no triangle at all, depending on the values.
Q: Can a SAS triangle be a right triangle?
A: Yes. A SAS triangle is a right triangle exactly when the included angle gamma is 90 deg. In that case the law of cosines reduces to the Pythagorean theorem, the law of sines gives the other two angles as the standard complementary pair, and the area simplifies to 0.5 * a * b.