Skip to content
Triangle Calculator
Tools

Triangle Calculator

Nytt

Solve any triangle — find missing sides, angles and area from any 3 known values.

Runs entirely in your browser. Nothing is uploaded.

What Is a Triangle Calculator?

A triangle calculator is an online tool that solves for all unknown sides, angles, area, and perimeter of a triangle given any valid combination of known values. Rather than manually applying the Law of Cosines and Law of Sines — which involves multiple steps of trigonometric computation — a triangle solver does all the arithmetic instantly and displays a labeled diagram of the result. Engineers, architects, students, and surveyors use triangle calculators daily for problems ranging from roof framing to navigation to geometry homework.

Our free triangle calculator supports all five standard input configurations: SSS (three sides known), SAS (two sides and the included angle), ASA (two angles and the included side), AAS (two angles and a non-included side), and SSA (two sides and a non-included angle, the ambiguous case). It automatically identifies right, obtuse, acute, equilateral, isosceles, and scalene triangles, and handles the SSA ambiguous case by returning both valid solutions when they exist.

How to Use the Triangle Solver

Select your input mode from the tab bar at the top (SSS, SAS, ASA, AAS, or SSA). Enter your known values in the labeled fields — sides in any consistent length unit and angles in degrees. Click Solve Triangle to instantly compute all unknown sides, angles, the area using Heron's formula or the SAS formula, and the perimeter. The result panel shows a labeled grid of all six triangle values plus a scaled SVG diagram with vertices A, B, C and sides a, b, c labeled at their midpoints.

For SSA inputs, if two valid triangles exist, the ambiguous second solution is displayed in a highlighted warning box below the primary result. If your inputs produce no valid triangle — for example because the given side is too short to reach the opposite vertex — the tool shows a clear error message explaining why rather than returning a nonsensical answer. All computation happens in your browser, so results appear instantly with no server delay.

Triangle Types, Formulas & Real-World Applications

The Law of Cosines (c² = a² + b² − 2ab·cos(C)) is the cornerstone formula for triangle solving, generalizing the Pythagorean theorem to all triangles. The Law of Sines (a/sin A = b/sin B = c/sin C) handles angle-side proportionality. Heron's formula computes area from three sides alone: Area = √(s(s−a)(s−b)(s−c)) where s is the semi-perimeter. These three formulas cover every triangle-solving scenario without exception.

Real-world applications are wide: surveying uses triangulation to locate landmarks without physical access; construction uses SAS triangles for rafter lengths and pitch angles; navigation uses ASA configurations to find distances between waypoints; physics uses SAS force triangles to compute resultant vectors. The same geometric principles that power GPS trilateration appear in geometry homework — understanding them with a visual tool builds intuition that transfers directly to professional practice.

Why Our Solver Beats Calculator.net, Wolfram Alpha, and Symbolab

Most competing triangle calculators fall short on one or more fronts. Calculator.net covers the basics but lacks SSA ambiguous-case detection — it returns one answer and doesn't tell you when a second valid triangle also exists. Wolfram Alpha handles the math well but puts step-by-step solutions behind a paid Pro subscription ($7.99/month), and its natural-language input is hit-or-miss for geometry problems. Symbolab follows the same paywall model for detailed steps.

Our triangle calculator is fully free with no paywall, no account, and no usage limit. It correctly detects and reports both solutions in the SSA ambiguous case. The SVG diagram scales dynamically to your specific triangle proportions, so you always see an accurate visual representation rather than a generic placeholder. All computation runs locally in your browser — no server, no data sent, instant results even offline. It also works on iPhone, Android, and any tablet without installing anything.

Privacy, Offline Use, and Device Compatibility

Every calculation happens entirely inside your browser using JavaScript — no data is sent to a server at any point. Your triangle measurements, whether they're for a homework assignment or a real construction project, never leave your device. The tool works on any modern browser including Chrome, Firefox, Safari, and Edge, on desktop and mobile alike.

Once the page has loaded, the triangle solver works fully offline. If you lose your internet connection mid-session, your results are unaffected. There is no account to create, no email required, and no cookie tracking your sessions. You can bookmark it and use it repeatedly for free — the same tool, the same speed, the same precision every time.

The Triangle Inequality Theorem: When Three Sides Cannot Form a Triangle

The triangle inequality theorem states that the sum of any two side lengths must be strictly greater than the third side. Formally, for sides a, b, and c, all three conditions must hold: a + b > c, a + c > b, and b + c > a. This constraint arises directly from Euclidean geometry — the shortest path between two points is a straight line, so if one side equals or exceeds the sum of the other two, the triangle collapses into a straight line segment and ceases to be a polygon with area.

When the equality condition is met exactly — that is, a + b = c — the result is called a degenerate triangle. All three vertices become collinear, the triangle's area is exactly zero, and both of its non-trivial angles (A and B) flatten to 0° and 180° respectively. While mathematically valid as a limiting case, a degenerate triangle has no practical geometric meaning and the calculator treats it as an error. For example, sides 3, 4, and 7 violate the theorem (3 + 4 = 7, not greater), while sides 3, 4, and 6 pass: 3 + 4 = 7 > 6, 3 + 6 = 9 > 4, and 4 + 6 = 10 > 3.

The triangle inequality check is always the first validation step performed before any trigonometric formula is applied. Without this guard, the Law of Cosines would receive inputs that push its argument outside the valid range of arccos (−1 to 1), producing a domain error or a NaN result. By catching invalid triplets early and returning a clear explanatory message, the calculator saves users from misinterpreting a computation failure as a bug rather than an impossible input. Common invalid examples include 1, 2, 5 (1 + 2 = 3 < 5) and 10, 3, 3 (3 + 3 = 6 < 10), both of which are physically impossible configurations.

Special Triangles and Pythagorean Triples: Exact Values You Should Know

The 30-60-90 triangle is formed by bisecting an equilateral triangle along its altitude. Its sides are always in the ratio 1 : √3 : 2 (short leg : long leg : hypotenuse). Because the angles are fixed, the trigonometric ratios at 30° and 60° are exact: sin 30° = 1/2, cos 30° = √3/2, tan 30° = 1/√3; sin 60° = √3/2, cos 60° = 1/2. The 45-45-90 triangle (isosceles right triangle) has legs in ratio 1 : 1 and a hypotenuse of √2 times the leg length, giving sin 45° = cos 45° = 1/√2 = √2/2. These two special triangles underlie every trigonometry table and are the reason a unit-circle chart reduces to just a handful of memorized values.

Pythagorean triples are integer side-length sets that satisfy a² + b² = c² exactly, making them indispensable when exact integer measurements are required. The fundamental triple is 3-4-5: 9 + 16 = 25. Scaling produces valid triples — 6-8-10, 9-12-15, 15-20-25 — and other primitive triples include 5-12-13 (25 + 144 = 169), 8-15-17, and 7-24-25. In construction and carpentry, the 3-4-5 rule is the standard method for checking right angles: measure 3 units along one wall and 4 units along the perpendicular wall; if the diagonal distance is exactly 5 units, the corner is square. No protractor or angle gauge is required.

A less familiar but geometrically striking special triangle is the golden gnomon, an isosceles triangle with angles 36°-72°-72°. In this triangle, the ratio of the longer (equal) sides to the shorter base is exactly φ (phi) = (1 + √5)/2 ≈ 1.618, the golden ratio. The golden gnomon tiles itself recursively — the triangle can be subdivided into two smaller golden gnomons and a golden triangle — and it appears in the geometry of the regular pentagon and pentagram. Its existence reveals a deep link between Euclidean triangle geometry and the Fibonacci sequence that appears throughout botany, art, and architecture.

Triangles in Architecture, Engineering, and Nature

The triangle's dominance in structural engineering comes from a single mechanical property: it is the only polygon that is inherently rigid under load. A square or rectangle can shear into a parallelogram when force is applied to a corner — without diagonal cross-bracing it has no resistance to racking. A triangle, by contrast, cannot change shape without changing the length of at least one side. This rigidity is why truss bridges — including the Pratt, Warren, and Howe trusses used on railroad and highway bridges worldwide — decompose span loads into triangular arrangements of compression and tension members. Each triangle in a truss carries only axial force, which steel and timber handle far more efficiently than bending.

Geodesic domes, developed by Buckminster Fuller in the mid-twentieth century, take triangle rigidity to a global scale. Fuller's method subdivides the faces of an icosahedron into smaller and smaller equilateral triangles, projecting each vertex outward onto a sphere. The result is a near-spherical shell built entirely from triangular panels — the structure distributes stress uniformly across the surface so that no single member bears a disproportionate load. The Montreal Biosphere and Disney's Epcot Spaceship Earth are iconic examples. In surveying, triangulation uses a known baseline distance and the angles to a distant point measured from each end of the baseline to compute the point's position using the Law of Sines — the same method used to map continents before satellite GPS existed, and still used to calibrate GPS receivers today.

In computer graphics and 3D rendering, the triangle is the universal primitive for surface representation. Every curved surface — a human face, a car body, a terrain heightmap — is approximated as a triangle mesh, because three non-collinear points define exactly one plane (no planarity guarantee exists for quads or higher-order polygons). Modern GPUs are designed at the hardware level to rasterize triangles at maximum speed: the fixed-function rasterizer, vertex shader, and fragment shader pipeline all assume triangle input. The triangle's combination of planarity, rigidity, and mathematical simplicity makes it the irreducible atom of both physical structures and digital geometry.

Area Formulas for Every Triangle Configuration

The most elementary area formula is base × height / 2, which requires the perpendicular height from a vertex to the opposite side. This is straightforward when the height is given directly — for instance, the altitude of a triangular plot of land is surveyed explicitly — but impossible to apply when only sides and angles are known without first computing the height. For that reason, most practical triangle-solving situations call for one of the trigonometric or algebraic area formulas instead.

When two sides and the included angle are known (SAS configuration), the area is given by Area = ½ · a · b · sin C, where C is the angle between sides a and b. This formula is derived directly from the base-height definition: side a is the base, and b · sin C is the perpendicular height dropped from vertex B onto side a. For a right triangle where C = 90°, sin 90° = 1 and the formula reduces to the familiar ½ab leg formula. Heron's formula covers the SSS case without any angle: first compute the semi-perimeter s = (a + b + c) / 2, then Area = √(s(s − a)(s − b)(s − c)). Both Heron's formula and the SAS formula produce identical results — the choice between them is purely one of numerical stability given which values are available.

Two circle-based area formulas connect the triangle's dimensions to its circumscribed and inscribed circles. The circumradius formula states Area = abc / (4R), where R is the radius of the circumscribed circle (circumcircle) passing through all three vertices. The inradius formula states Area = r · s, where r is the inradius (radius of the inscribed circle tangent to all three sides) and s is the semi-perimeter. These formulas are inverses of one another in a sense: solving for R gives R = abc / (4 · Area), and solving for r gives r = Area / s. For an equilateral triangle with side a, R = a / √3 and r = a / (2√3), so R = 2r — the circumcircle is always exactly twice as large as the incircle, a ratio that holds only for equilateral triangles. These circle relationships appear in optics (focusing mirrors), mechanical engineering (gear tooth geometry), and classical geometry proofs, making them far more than abstract curiosities.

Frequently asked questions

What information do I need to solve a triangle?

You need at least three pieces of information including at least one side length. The five valid combinations are: SSS (all three sides), SAS (two sides and the included angle between them), ASA (two angles and the side between them), AAS (two angles and a non-included side), and SSA (two sides and an angle opposite one of them — the ambiguous case). Three angles alone (AAA) define the shape but not the size, so they are insufficient without at least one side measurement.

What is the Law of Cosines and when do I use it?

The Law of Cosines states c² = a² + b² − 2ab·cos(C), which generalizes the Pythagorean theorem to any triangle. It is used for SSS (to find all angles from three sides) and SAS (to find the third side from two sides and the included angle). For a right triangle where C = 90°, cos(90°) = 0 and the formula reduces to the familiar c² = a² + b², confirming the Law of Cosines as the most general triangle formula. Using it first — before the Law of Sines — avoids the sign ambiguity that trips up obtuse-triangle calculations.

What is the Law of Sines and when do I use it?

The Law of Sines states a/sin(A) = b/sin(B) = c/sin(C), meaning each side divided by the sine of its opposite angle equals a constant (the diameter of the circumscribed circle). It is particularly useful for ASA and AAS cases. It can also handle SSA, but the SSA case may produce 0, 1, or 2 valid triangles because sin(B) = sin(180° − B) yields two possible angle values — this is the ambiguous case. Our calculator checks both possibilities and reports all valid solutions.

What is the ambiguous SSA case?

In SSA (given side a, side b, and angle A opposite side a), the triangle is ambiguous because sin(B) = b·sin(A)/a may yield two valid angles: B and 180° − B. If sin(B) > 1, no triangle exists. If sin(B) = 1, exactly one right triangle exists. If 0 < sin(B) < 1, both B and 180° − B may form valid triangles — our calculator checks both possibilities and returns all valid solutions separately with a clear note explaining the ambiguity. Most basic triangle tools either skip this case entirely or return only one answer without warning.

How is the area of a triangle calculated?

The calculator uses the SAS area formula: Area = ½ × a × b × sin(C), which works for any triangle once two sides and the included angle are known. For SSS inputs, one angle is first found via the Law of Cosines, then the SAS formula is applied. An equivalent formula is Heron's formula: Area = √(s(s−a)(s−b)(s−c)) where s = (a+b+c)/2 is the semi-perimeter — this requires only the three side lengths and no angle. Both methods give identical results; we use whichever is most numerically stable for your inputs.

Does the calculator handle right triangles?

Yes — right triangles are fully supported and automatically identified. If any angle is exactly 90°, the hypotenuse (the side opposite the right angle) is labeled in the results. You can enter a right triangle using SSS (three sides satisfying a² + b² = c²), or using ASA/AAS with one angle set to 90°. The Pythagorean theorem is a special case of the Law of Cosines with C = 90°, and both methods give identical results. The labeled diagram also marks the right angle with a square corner symbol.

Why might my triangle have no solution?

A triangle has no solution if: (1) the triangle inequality fails — the sum of any two sides must be strictly greater than the third side; (2) the angles don't sum to 180° for inputs that specify angles; (3) in the SSA case, the calculated sin(B) exceeds 1 (the given side is too short to reach the opposite vertex); (4) all three numeric inputs are negative or zero. The calculator detects all these conditions and displays an explanatory error message rather than silently returning a nonsensical answer.

What is the perimeter of a triangle?

The perimeter is the sum of all three side lengths: P = a + b + c. Once the calculator has solved for all three sides using the Law of Cosines or Sines, the perimeter is computed automatically and displayed. For a right triangle with legs a and b, the hypotenuse is c = √(a² + b²), so the perimeter is a + b + √(a² + b²). The perimeter is useful for problems involving fencing, framing, or physical boundary calculations where you need the total edge length of a triangular region.

What are the different types of triangles?

Triangles are classified by sides: equilateral (all three sides equal, all angles 60°), isosceles (two sides equal, two angles equal), or scalene (all sides and angles different). By angles: acute (all angles < 90°), right (one angle = 90°), or obtuse (one angle > 90°). The calculator identifies the type automatically from the solved values and labels the diagram accordingly. Knowing the type helps interpret results — for example, an obtuse triangle has its longest side opposite the obtuse angle.

How do I find the angles of a triangle from three sides (SSS)?

Use the Law of Cosines rearranged for each angle: cos(A) = (b² + c² − a²) / (2bc), cos(B) = (a² + c² − b²) / (2ac), cos(C) = (a² + b² − c²) / (2ab). Take the arccosine of each result to get the angles in degrees. Always compute the largest angle first (opposite the longest side) to avoid rounding errors, then use the Law of Sines for the remaining angles. Verify by confirming A + B + C = 180°. Our calculator does all of this automatically and shows intermediate steps on request.

What is Heron's formula for triangle area?

Heron's formula computes the area of a triangle directly from its three side lengths without needing any angle. Given sides a, b, c, first compute the semi-perimeter s = (a + b + c) / 2. Then Area = √(s × (s−a) × (s−b) × (s−c)). This formula, attributed to the ancient Greek mathematician Heron of Alexandria, produces the same result as the SAS formula but requires no trigonometry — making it ideal for SSS inputs where you have only side measurements and no angles.

Can the calculator handle obtuse triangles?

Yes. The Law of Cosines and Law of Sines both work for obtuse triangles (those with one angle greater than 90°). The key consideration is that the Law of Sines can sometimes produce an acute angle when the true solution requires an obtuse angle — this is part of the SSA ambiguity. The calculator handles obtuse solutions correctly by checking whether 180° minus the computed angle also forms a valid triangle and reporting both when applicable. Wolfram Alpha and many basic online calculators get this wrong for obtuse SSA cases.

How does this compare to Wolfram Alpha and Symbolab for triangle solving?

Wolfram Alpha can solve triangles but forces you through its natural language interface, often requires rephrasing when input isn't recognized, and uses a subscription paywall for step-by-step explanations. Symbolab similarly puts detailed steps behind a subscription. Our triangle calculator is free with no paywall, shows a live labeled SVG diagram, handles all five input configurations including SSA ambiguity, and loads instantly without an account. Calculator.net offers a similar free tool but lacks the ambiguous-case detection and diagram scaling that this tool provides.

How do I use the triangle calculator for construction or real-world measurements?

Enter your known measurements (in any consistent unit — feet, meters, inches) into the appropriate fields for your input type. For a roof with known width (base = side c) and a specified pitch angle (angle C = 90° for a right-angle roof with angle A as pitch), use SAS or ASA mode. The calculator returns rafter length, all angles, and area — directly usable for material estimation. The unit system you input is the unit system you get back, so there is no conversion needed.

What is the circumradius of a triangle?

The circumradius R is the radius of the circle that passes through all three vertices of the triangle (the circumscribed circle). It is given by R = a / (2·sin(A)) = b / (2·sin(B)) = c / (2·sin(C)). This relationship is exactly the Law of Sines constant. For a right triangle, the circumradius equals half the hypotenuse length. The circumradius appears in advanced geometry, navigation problems, and the proof of many triangle theorems including Ptolemy's theorem and the extended law of sines.

Related tools

Se alle verktøy