{
  "version": "v1",
  "source": "https://craftquantities.com",
  "licence": "CC BY 4.0",
  "licenceUrl": "https://creativecommons.org/licenses/by/4.0/",
  "attribution": "Craft Quantities — craftquantities.com",
  "documentation": "https://craftquantities.com/api/",
  "versioning": "Fields are added, never removed or repurposed, within a version. A breaking change becomes /api/v2/ and v1 keeps being built.",
  "slug": "triangle-calculator",
  "category": "measurements-conversions",
  "title": "Triangle Calculator — Right Triangle and Any Triangle Solver",
  "description": "Solve a right triangle from any two of rise, run, slope length and angle, or any triangle from three known parts: every side, every angle and the area.",
  "url": "https://craftquantities.com/calculators/measurements-conversions/triangle-calculator/",
  "json": "https://craftquantities.com/api/v1/calculators/triangle-calculator.json",
  "inputCount": 28,
  "testCaseCount": 14,
  "sourceCount": 4,
  "lastVerified": "2026-10-05",
  "translations": {
    "es-US": "https://craftquantities.com/es/calculators/measurements-conversions/triangle-calculator/"
  },
  "citation": {
    "author": "Craft Quantities",
    "title": "Triangle Calculator — Right Triangle and Any Triangle Solver",
    "version": "1.0.0",
    "sourcesChecked": "2026-10-05",
    "url": "https://craftquantities.com/calculators/measurements-conversions/triangle-calculator/",
    "accessDate": null,
    "accessDateNote": "Add the date you retrieved this. It is deliberately absent: a static file cannot know when you read it, and the build date would be wrong.",
    "permanentVersionedUrl": null,
    "permanentVersionedUrlNote": "Not offered. This site keeps no archive of previous builds, so any such URL would resolve to the current page or to nothing. The version and sourcesChecked fields identify the calculation instead.",
    "formats": {
      "plain": "Craft Quantities. Triangle Calculator — Right Triangle and Any Triangle Solver. Version 1.0.0. Sources checked 2026-10-05. https://craftquantities.com/calculators/measurements-conversions/triangle-calculator/",
      "apa": "Craft Quantities. (2026). Triangle Calculator — Right Triangle and Any Triangle Solver (Version 1.0.0) [Web calculator]. Retrieved from https://craftquantities.com/calculators/measurements-conversions/triangle-calculator/",
      "harvard": "Craft Quantities (2026) Triangle Calculator — Right Triangle and Any Triangle Solver (Version 1.0.0). Available at: https://craftquantities.com/calculators/measurements-conversions/triangle-calculator/",
      "bibtex": "@misc{craftquantities-calculators-measurements-conversions-triangle-calculator,\n  author       = {{Craft Quantities}},\n  title        = {Triangle Calculator — Right Triangle and Any Triangle Solver},\n  version      = {1.0.0},\n  year         = {2026},\n  howpublished = {\\url{https://craftquantities.com/calculators/measurements-conversions/triangle-calculator/}},\n}"
    }
  },
  "inputs": [
    {
      "id": "solveFrom",
      "label": "What You Know",
      "type": "select",
      "defaultValue": "rise-run",
      "options": [
        {
          "value": "rise-run",
          "label": "Right triangle: the rise and the run"
        },
        {
          "value": "run-slope",
          "label": "Right triangle: the run and the slope length"
        },
        {
          "value": "rise-slope",
          "label": "Right triangle: the rise and the slope length"
        },
        {
          "value": "run-angle",
          "label": "Right triangle: the run and the slope angle"
        },
        {
          "value": "rise-angle",
          "label": "Right triangle: the rise and the slope angle"
        },
        {
          "value": "slope-angle",
          "label": "Right triangle: the slope length and its angle"
        },
        {
          "value": "sss",
          "label": "Any triangle: three sides (SSS)"
        },
        {
          "value": "sas",
          "label": "Any triangle: two sides and the angle between them (SAS)"
        },
        {
          "value": "asa",
          "label": "Any triangle: two angles and the side between them (ASA)"
        },
        {
          "value": "aas",
          "label": "Any triangle: two angles and a side opposite one (AAS)"
        },
        {
          "value": "ssa",
          "label": "Any triangle: two sides and an angle opposite one (SSA)"
        }
      ],
      "help": "Pick the pair of values you have for a right triangle, or the three you have for any other."
    },
    {
      "id": "rrRise",
      "label": "Rise",
      "type": "number",
      "dimension": "length",
      "defaultValue": 1.2,
      "min": 0.001,
      "max": 1000,
      "step": 0.01,
      "help": "The vertical leg: how far the slope climbs over its run."
    },
    {
      "id": "rrRun",
      "label": "Run",
      "type": "number",
      "dimension": "length",
      "defaultValue": 3.6,
      "min": 0.001,
      "max": 1000,
      "step": 0.01,
      "help": "The horizontal leg: the plan distance the slope covers."
    },
    {
      "id": "rlRun",
      "label": "Run",
      "type": "number",
      "dimension": "length",
      "defaultValue": 3.6,
      "min": 0.001,
      "max": 1000,
      "step": 0.01,
      "help": "The horizontal leg, measured level."
    },
    {
      "id": "rlSlope",
      "label": "Slope Length",
      "type": "number",
      "dimension": "length",
      "defaultValue": 4,
      "min": 0.001,
      "max": 1000,
      "step": 0.01,
      "help": "The hypotenuse: the length along the slope between the same two points."
    },
    {
      "id": "hlRise",
      "label": "Rise",
      "type": "number",
      "dimension": "length",
      "defaultValue": 2.6,
      "min": 0.001,
      "max": 1000,
      "step": 0.01,
      "help": "The vertical leg: the height the slope has to climb."
    },
    {
      "id": "hlSlope",
      "label": "Slope Length",
      "type": "number",
      "dimension": "length",
      "defaultValue": 4.2,
      "min": 0.001,
      "max": 1000,
      "step": 0.01,
      "help": "The length along the slope, which sets how far out its base lands."
    },
    {
      "id": "raRun",
      "label": "Run",
      "type": "number",
      "dimension": "length",
      "defaultValue": 3.6,
      "min": 0.001,
      "max": 1000,
      "step": 0.01,
      "help": "The horizontal leg under the slope."
    },
    {
      "id": "raAngle",
      "label": "Slope Angle (degrees)",
      "type": "number",
      "defaultValue": 30,
      "min": 0.1,
      "max": 89.9,
      "step": 0.1,
      "help": "The angle between the run and the slope, at the base of the slope, in degrees."
    },
    {
      "id": "haRise",
      "label": "Rise",
      "type": "number",
      "dimension": "length",
      "defaultValue": 2.6,
      "min": 0.001,
      "max": 1000,
      "step": 0.01,
      "help": "The vertical leg the slope has to climb."
    },
    {
      "id": "haAngle",
      "label": "Slope Angle (degrees)",
      "type": "number",
      "defaultValue": 35,
      "min": 0.1,
      "max": 89.9,
      "step": 0.1,
      "help": "The angle the slope makes with the level, in degrees."
    },
    {
      "id": "laSlope",
      "label": "Slope Length",
      "type": "number",
      "dimension": "length",
      "defaultValue": 4.8,
      "min": 0.001,
      "max": 1000,
      "step": 0.01,
      "help": "The length of the sloping member between its two points."
    },
    {
      "id": "laAngle",
      "label": "Slope Angle (degrees)",
      "type": "number",
      "defaultValue": 45,
      "min": 0.1,
      "max": 89.9,
      "step": 0.1,
      "help": "The angle between the member and the level, in degrees."
    },
    {
      "id": "sssA",
      "label": "Side a",
      "type": "number",
      "dimension": "length",
      "defaultValue": 7,
      "min": 0.001,
      "max": 10000,
      "step": 0.01,
      "help": "One side; angle A is the corner opposite it."
    },
    {
      "id": "sssB",
      "label": "Side b",
      "type": "number",
      "dimension": "length",
      "defaultValue": 5,
      "min": 0.001,
      "max": 10000,
      "step": 0.01,
      "help": "The second side; angle B faces it."
    },
    {
      "id": "sssC",
      "label": "Side c",
      "type": "number",
      "dimension": "length",
      "defaultValue": 6,
      "min": 0.001,
      "max": 10000,
      "step": 0.01,
      "help": "The third side; angle C faces it."
    },
    {
      "id": "sasB",
      "label": "Side b",
      "type": "number",
      "dimension": "length",
      "defaultValue": 4,
      "min": 0.001,
      "max": 10000,
      "step": 0.01,
      "help": "One of the two sides that meet at the known angle."
    },
    {
      "id": "sasC",
      "label": "Side c",
      "type": "number",
      "dimension": "length",
      "defaultValue": 5,
      "min": 0.001,
      "max": 10000,
      "step": 0.01,
      "help": "The other side meeting at the known angle."
    },
    {
      "id": "sasAngleA",
      "label": "Angle A Between Them (degrees)",
      "type": "number",
      "defaultValue": 60,
      "min": 0.1,
      "max": 179.9,
      "step": 0.1,
      "help": "The angle at the corner where sides b and c meet, in degrees."
    },
    {
      "id": "asaAngleB",
      "label": "Angle B (degrees)",
      "type": "number",
      "defaultValue": 50,
      "min": 0.1,
      "max": 179.9,
      "step": 0.1,
      "help": "The angle at one end of the known side, in degrees."
    },
    {
      "id": "asaAngleC",
      "label": "Angle C (degrees)",
      "type": "number",
      "defaultValue": 60,
      "min": 0.1,
      "max": 179.9,
      "step": 0.1,
      "help": "The angle at the other end of the known side, in degrees."
    },
    {
      "id": "asaA",
      "label": "Side a Between Them",
      "type": "number",
      "dimension": "length",
      "defaultValue": 6,
      "min": 0.001,
      "max": 10000,
      "step": 0.01,
      "help": "The side joining the two known angles."
    },
    {
      "id": "aasAngleA",
      "label": "Angle A (degrees)",
      "type": "number",
      "defaultValue": 40,
      "min": 0.1,
      "max": 179.9,
      "step": 0.1,
      "help": "The angle opposite the known side, in degrees."
    },
    {
      "id": "aasAngleB",
      "label": "Angle B (degrees)",
      "type": "number",
      "defaultValue": 60,
      "min": 0.1,
      "max": 179.9,
      "step": 0.1,
      "help": "A second angle, at one end of the known side, in degrees."
    },
    {
      "id": "aasA",
      "label": "Side a",
      "type": "number",
      "dimension": "length",
      "defaultValue": 5,
      "min": 0.001,
      "max": 10000,
      "step": 0.01,
      "help": "The known side, the one opposite angle A."
    },
    {
      "id": "ssaA",
      "label": "Side a",
      "type": "number",
      "dimension": "length",
      "defaultValue": 4,
      "min": 0.001,
      "max": 10000,
      "step": 0.01,
      "help": "The side opposite the known angle A."
    },
    {
      "id": "ssaB",
      "label": "Side b",
      "type": "number",
      "dimension": "length",
      "defaultValue": 5,
      "min": 0.001,
      "max": 10000,
      "step": 0.01,
      "help": "The other known side, which meets side c at angle A."
    },
    {
      "id": "ssaAngleA",
      "label": "Angle A (degrees)",
      "type": "number",
      "defaultValue": 40,
      "min": 0.1,
      "max": 179.9,
      "step": 0.1,
      "help": "The known angle, opposite side a and not between the two known sides, in degrees."
    }
  ],
  "sources": [
    {
      "label": "NIST Digital Library of Mathematical Functions, §4.42 Solution of Triangles: the right-triangle ratios sin A = a/c, cos A = b/c and tan A = a/b (4.42.1–4.42.3), the law of sines (4.42.4), the law of cosines c² = a² + b² − 2ab cos C (4.42.5), and the area ½bc sin A = √(s(s − a)(s − b)(s − c)) with s the semi-perimeter (4.42.7)",
      "url": "https://dlmf.nist.gov/4.42"
    },
    {
      "label": "Euclid, Elements, Book I (D. E. Joyce's edition, Clark University): Proposition 47, the square on the side opposite the right angle equals the squares on the other two sides together; Proposition 32, the three angles of a triangle together make two right angles; Proposition 20, any two sides of a triangle together are greater than the third",
      "url": "https://mathcs.clarku.edu/~djoyce/elements/bookI/propI47.html"
    },
    {
      "label": "OpenStax, Algebra and Trigonometry 2e (Rice University), §10.1 Non-right Triangles: Law of Sines — two sides and a non-included angle (SSA) may give no triangle, one right triangle, one triangle or two triangles; the area of an oblique triangle is half the product of two sides and the sine of the angle between them",
      "url": "https://openstax.org/books/algebra-and-trigonometry-2e/pages/10-1-non-right-triangles-law-of-sines"
    },
    {
      "label": "DeWALT Rafter Square (DWHT46031) instruction manual: rafter lengths from the tables are to the centre of the ridge, so half the ridge board's thickness is deducted from the listed length before the top plumb cut is made, measured at right angles to the top plumb cut line and marked parallel to it; the worked example takes the run as half of a 20 ft building's width",
      "url": "https://assets.dewalt.com/GLOBALBOM/QU/DWHT46031/all/Instruction_Manual/EN/DWHT46031_RafterSquare.pdf"
    }
  ],
  "testCases": [
    {
      "name": "the 3-4-5 triangle: a rise of 3 and a run of 4 slope 5",
      "inputs": {
        "solveFrom": "rise-run",
        "rrRise": 3,
        "rrRun": 4
      },
      "expected": 5,
      "toleranceDecimalPlaces": 9,
      "unit": "m slope length",
      "confidence": "high",
      "steps": [
        {
          "label": "Rise, side a",
          "value": 3,
          "unit": "m"
        },
        {
          "label": "Run, side b",
          "value": 4,
          "unit": "m"
        },
        {
          "label": "Slope length, side c",
          "value": 5,
          "unit": "m"
        },
        {
          "label": "Slope angle at the base, angle A",
          "value": 36.86989764584402,
          "unit": "°"
        },
        {
          "label": "Angle at the top, angle B",
          "value": 53.13010235415598,
          "unit": "°"
        },
        {
          "label": "Rise over run",
          "value": 75,
          "unit": "%"
        },
        {
          "label": "Area",
          "value": 6,
          "unit": "m²"
        },
        {
          "label": "Perimeter",
          "value": 12,
          "unit": "m"
        }
      ],
      "basis": "cited",
      "sourceIndex": 1
    },
    {
      "name": "the opening rafter: rise 1.2 m over a 3.6 m run",
      "inputs": {
        "solveFrom": "rise-run",
        "rrRise": 1.2,
        "rrRun": 3.6
      },
      "expected": 3.794733,
      "toleranceDecimalPlaces": 5,
      "unit": "m slope length",
      "confidence": "high",
      "steps": [
        {
          "label": "Rise, side a",
          "value": 1.2,
          "unit": "m"
        },
        {
          "label": "Run, side b",
          "value": 3.6,
          "unit": "m"
        },
        {
          "label": "Slope length, side c",
          "value": 3.7947331922020555,
          "unit": "m"
        },
        {
          "label": "Slope angle at the base, angle A",
          "value": 18.43494882292201,
          "unit": "°"
        },
        {
          "label": "Angle at the top, angle B",
          "value": 71.56505117707799,
          "unit": "°"
        },
        {
          "label": "Rise over run",
          "value": 33.33333333333333,
          "unit": "%"
        },
        {
          "label": "Area",
          "value": 2.16,
          "unit": "m²"
        },
        {
          "label": "Perimeter",
          "value": 8.594733192202055,
          "unit": "m"
        }
      ],
      "basis": "cited",
      "sourceIndex": 0
    },
    {
      "name": "a ladder: 5 long, base 4 out, reaches 3 up",
      "inputs": {
        "solveFrom": "run-slope",
        "rlRun": 4,
        "rlSlope": 5
      },
      "expected": 3,
      "toleranceDecimalPlaces": 9,
      "unit": "m rise",
      "confidence": "high",
      "steps": [
        {
          "label": "Rise, side a",
          "value": 3,
          "unit": "m"
        },
        {
          "label": "Run, side b",
          "value": 4,
          "unit": "m"
        },
        {
          "label": "Slope length, side c",
          "value": 5,
          "unit": "m"
        },
        {
          "label": "Slope angle at the base, angle A",
          "value": 36.86989764584402,
          "unit": "°"
        },
        {
          "label": "Angle at the top, angle B",
          "value": 53.13010235415598,
          "unit": "°"
        },
        {
          "label": "Rise over run",
          "value": 75,
          "unit": "%"
        },
        {
          "label": "Area",
          "value": 6,
          "unit": "m²"
        },
        {
          "label": "Perimeter",
          "value": 12,
          "unit": "m"
        }
      ],
      "basis": "cited",
      "sourceIndex": 1
    },
    {
      "name": "a stringer 4.2 long over a 2.6 rise covers a 3.298 run",
      "inputs": {
        "solveFrom": "rise-slope",
        "hlRise": 2.6,
        "hlSlope": 4.2
      },
      "expected": 3.298485,
      "toleranceDecimalPlaces": 5,
      "unit": "m run",
      "confidence": "high",
      "steps": [
        {
          "label": "Rise, side a",
          "value": 2.6,
          "unit": "m"
        },
        {
          "label": "Run, side b",
          "value": 3.298484500494128,
          "unit": "m"
        },
        {
          "label": "Slope length, side c",
          "value": 4.2,
          "unit": "m"
        },
        {
          "label": "Slope angle at the base, angle A",
          "value": 38.24661987834499,
          "unit": "°"
        },
        {
          "label": "Angle at the top, angle B",
          "value": 51.75338012165501,
          "unit": "°"
        },
        {
          "label": "Rise over run",
          "value": 78.82407813680823,
          "unit": "%"
        },
        {
          "label": "Area",
          "value": 4.288029850642367,
          "unit": "m²"
        },
        {
          "label": "Perimeter",
          "value": 10.098484500494127,
          "unit": "m"
        }
      ],
      "basis": "cited",
      "sourceIndex": 0
    },
    {
      "name": "a 30° roof over a 3.6 run has a 4.157 rafter line",
      "inputs": {
        "solveFrom": "run-angle",
        "raRun": 3.6,
        "raAngle": 30
      },
      "expected": 4.156922,
      "toleranceDecimalPlaces": 5,
      "unit": "m slope length",
      "confidence": "high",
      "steps": [
        {
          "label": "Rise, side a",
          "value": 2.0784609690826525,
          "unit": "m"
        },
        {
          "label": "Run, side b",
          "value": 3.6,
          "unit": "m"
        },
        {
          "label": "Slope length, side c",
          "value": 4.156921938165305,
          "unit": "m"
        },
        {
          "label": "Slope angle at the base, angle A",
          "value": 30,
          "unit": "°"
        },
        {
          "label": "Angle at the top, angle B",
          "value": 60,
          "unit": "°"
        },
        {
          "label": "Rise over run",
          "value": 57.735026918962575,
          "unit": "%"
        },
        {
          "label": "Area",
          "value": 3.7412297443487748,
          "unit": "m²"
        },
        {
          "label": "Perimeter",
          "value": 9.835382907247958,
          "unit": "m"
        }
      ],
      "basis": "cited",
      "sourceIndex": 0
    },
    {
      "name": "a 35° flight over a 2.6 rise has a 4.533 stringer line",
      "inputs": {
        "solveFrom": "rise-angle",
        "haRise": 2.6,
        "haAngle": 35
      },
      "expected": 4.532962,
      "toleranceDecimalPlaces": 5,
      "unit": "m slope length",
      "confidence": "high",
      "steps": [
        {
          "label": "Rise, side a",
          "value": 2.6,
          "unit": "m"
        },
        {
          "label": "Run, side b",
          "value": 3.7131848175294984,
          "unit": "m"
        },
        {
          "label": "Slope length, side c",
          "value": 4.532961668614855,
          "unit": "m"
        },
        {
          "label": "Slope angle at the base, angle A",
          "value": 35,
          "unit": "°"
        },
        {
          "label": "Angle at the top, angle B",
          "value": 55,
          "unit": "°"
        },
        {
          "label": "Rise over run",
          "value": 70.02075382097097,
          "unit": "%"
        },
        {
          "label": "Area",
          "value": 4.827140262788348,
          "unit": "m²"
        },
        {
          "label": "Perimeter",
          "value": 10.846146486144352,
          "unit": "m"
        }
      ],
      "basis": "cited",
      "sourceIndex": 0
    },
    {
      "name": "a 4.8 brace at 45° climbs 3.394",
      "inputs": {
        "solveFrom": "slope-angle",
        "laSlope": 4.8,
        "laAngle": 45
      },
      "expected": 3.394113,
      "toleranceDecimalPlaces": 5,
      "unit": "m rise",
      "confidence": "high",
      "steps": [
        {
          "label": "Rise, side a",
          "value": 3.3941125496954276,
          "unit": "m"
        },
        {
          "label": "Run, side b",
          "value": 3.394112549695428,
          "unit": "m"
        },
        {
          "label": "Slope length, side c",
          "value": 4.8,
          "unit": "m"
        },
        {
          "label": "Slope angle at the base, angle A",
          "value": 45,
          "unit": "°"
        },
        {
          "label": "Angle at the top, angle B",
          "value": 45,
          "unit": "°"
        },
        {
          "label": "Rise over run",
          "value": 99.99999999999999,
          "unit": "%"
        },
        {
          "label": "Area",
          "value": 5.759999999999999,
          "unit": "m²"
        },
        {
          "label": "Perimeter",
          "value": 11.588225099390854,
          "unit": "m"
        }
      ],
      "basis": "cited",
      "sourceIndex": 0
    },
    {
      "name": "three sides 7, 5 and 6 enclose 14.697 by Heron's formula",
      "inputs": {
        "solveFrom": "sss",
        "sssA": 7,
        "sssB": 5,
        "sssC": 6
      },
      "expected": 14.696938,
      "toleranceDecimalPlaces": 5,
      "unit": "m²",
      "confidence": "high",
      "steps": [
        {
          "label": "Side a",
          "value": 7,
          "unit": "m"
        },
        {
          "label": "Side b",
          "value": 5,
          "unit": "m"
        },
        {
          "label": "Side c",
          "value": 6,
          "unit": "m"
        },
        {
          "label": "Angle A",
          "value": 78.46304096718451,
          "unit": "°"
        },
        {
          "label": "Angle B",
          "value": 44.415308597192976,
          "unit": "°"
        },
        {
          "label": "Angle C",
          "value": 57.12165043562251,
          "unit": "°"
        },
        {
          "label": "Area",
          "value": 14.696938456699069,
          "unit": "m²"
        },
        {
          "label": "Perimeter",
          "value": 18,
          "unit": "m"
        }
      ],
      "basis": "cited",
      "sourceIndex": 0
    },
    {
      "name": "a flat triangle: 3 and 4 laid end to end make 7, and no area",
      "inputs": {
        "solveFrom": "sss",
        "sssA": 3,
        "sssB": 4,
        "sssC": 7
      },
      "expected": 0,
      "toleranceDecimalPlaces": 9,
      "unit": "m²",
      "confidence": "low",
      "steps": [
        {
          "label": "Side a",
          "value": 3,
          "unit": "m"
        },
        {
          "label": "Side b",
          "value": 4,
          "unit": "m"
        },
        {
          "label": "Side c",
          "value": 7,
          "unit": "m"
        },
        {
          "label": "Angle A",
          "value": 0,
          "unit": "°"
        },
        {
          "label": "Angle B",
          "value": 0,
          "unit": "°"
        },
        {
          "label": "Angle C",
          "value": 180,
          "unit": "°"
        },
        {
          "label": "Area",
          "value": 0,
          "unit": "m²"
        },
        {
          "label": "Perimeter",
          "value": 14,
          "unit": "m"
        }
      ],
      "basis": "cited",
      "sourceIndex": 1
    },
    {
      "name": "two sides 4 and 5 at 60° enclose 8.660",
      "inputs": {
        "solveFrom": "sas",
        "sasB": 4,
        "sasC": 5,
        "sasAngleA": 60
      },
      "expected": 8.660254,
      "toleranceDecimalPlaces": 5,
      "unit": "m²",
      "confidence": "high",
      "steps": [
        {
          "label": "Side a",
          "value": 4.58257569495584,
          "unit": "m"
        },
        {
          "label": "Side b",
          "value": 4,
          "unit": "m"
        },
        {
          "label": "Side c",
          "value": 5,
          "unit": "m"
        },
        {
          "label": "Angle A",
          "value": 60,
          "unit": "°"
        },
        {
          "label": "Angle B",
          "value": 49.106605350869096,
          "unit": "°"
        },
        {
          "label": "Angle C",
          "value": 70.8933946491309,
          "unit": "°"
        },
        {
          "label": "Area",
          "value": 8.660254037844386,
          "unit": "m²"
        },
        {
          "label": "Perimeter",
          "value": 13.582575694955839,
          "unit": "m"
        }
      ],
      "basis": "cited",
      "sourceIndex": 0
    },
    {
      "name": "a 6 span pitched at 50° and 60° encloses 12.708",
      "inputs": {
        "solveFrom": "asa",
        "asaAngleB": 50,
        "asaAngleC": 60,
        "asaA": 6
      },
      "expected": 12.707827,
      "toleranceDecimalPlaces": 5,
      "unit": "m²",
      "confidence": "high",
      "steps": [
        {
          "label": "Side a",
          "value": 6,
          "unit": "m"
        },
        {
          "label": "Side b",
          "value": 4.891244814575428,
          "unit": "m"
        },
        {
          "label": "Side c",
          "value": 5.529629910641257,
          "unit": "m"
        },
        {
          "label": "Angle A",
          "value": 70,
          "unit": "°"
        },
        {
          "label": "Angle B",
          "value": 50,
          "unit": "°"
        },
        {
          "label": "Angle C",
          "value": 60,
          "unit": "°"
        },
        {
          "label": "Area",
          "value": 12.707826796653679,
          "unit": "m²"
        },
        {
          "label": "Perimeter",
          "value": 16.420874725216684,
          "unit": "m"
        }
      ],
      "basis": "cited",
      "sourceIndex": 0
    },
    {
      "name": "angles 40° and 60° with 5 opposite the 40° enclose 16.585",
      "inputs": {
        "solveFrom": "aas",
        "aasAngleA": 40,
        "aasAngleB": 60,
        "aasA": 5
      },
      "expected": 16.585349,
      "toleranceDecimalPlaces": 5,
      "unit": "m²",
      "confidence": "high",
      "steps": [
        {
          "label": "Side a",
          "value": 5,
          "unit": "m"
        },
        {
          "label": "Side b",
          "value": 6.736481776669304,
          "unit": "m"
        },
        {
          "label": "Side c",
          "value": 7.660444431189781,
          "unit": "m"
        },
        {
          "label": "Angle A",
          "value": 40,
          "unit": "°"
        },
        {
          "label": "Angle B",
          "value": 60,
          "unit": "°"
        },
        {
          "label": "Angle C",
          "value": 80,
          "unit": "°"
        },
        {
          "label": "Area",
          "value": 16.585348704223463,
          "unit": "m²"
        },
        {
          "label": "Perimeter",
          "value": 19.396926207859085,
          "unit": "m"
        }
      ],
      "basis": "cited",
      "sourceIndex": 0
    },
    {
      "name": "the ambiguous case: a 4, b 5, A 40° fits two triangles; the first encloses 9.982",
      "inputs": {
        "solveFrom": "ssa",
        "ssaA": 4,
        "ssaB": 5,
        "ssaAngleA": 40
      },
      "expected": 9.981728,
      "toleranceDecimalPlaces": 5,
      "unit": "m²",
      "confidence": "medium",
      "steps": [
        {
          "label": "Side a",
          "value": 4,
          "unit": "m"
        },
        {
          "label": "Side b",
          "value": 5,
          "unit": "m"
        },
        {
          "label": "Side c",
          "value": 6.21152484668499,
          "unit": "m"
        },
        {
          "label": "Angle A",
          "value": 40,
          "unit": "°"
        },
        {
          "label": "Angle B",
          "value": 53.464149014388475,
          "unit": "°"
        },
        {
          "label": "Angle C",
          "value": 86.53585098561152,
          "unit": "°"
        },
        {
          "label": "Area",
          "value": 9.98172802177298,
          "unit": "m²"
        },
        {
          "label": "Perimeter",
          "value": 15.211524846684991,
          "unit": "m"
        },
        {
          "label": "Second triangle: side c",
          "value": 1.4489195845047915,
          "unit": "m"
        },
        {
          "label": "Second triangle: angle B",
          "value": 126.53585098561152,
          "unit": "°"
        },
        {
          "label": "Second triangle: angle C",
          "value": 13.464149014388482,
          "unit": "°"
        },
        {
          "label": "Second triangle: area",
          "value": 2.3283688908796214,
          "unit": "m²"
        }
      ],
      "basis": "cited",
      "sourceIndex": 2
    },
    {
      "name": "the ambiguous case with a too short to reach: no triangle",
      "inputs": {
        "solveFrom": "ssa",
        "ssaA": 2,
        "ssaB": 5,
        "ssaAngleA": 40
      },
      "expected": 0,
      "toleranceDecimalPlaces": 9,
      "unit": "m²",
      "confidence": "low",
      "steps": [
        {
          "label": "Side a's shortfall against the height b × sin A",
          "value": 1.2139380484326963,
          "unit": "m"
        }
      ],
      "basis": "cited",
      "sourceIndex": 2
    }
  ]
}
