{
  "id": "triangular-prism",
  "version": "61d8c361ecce",
  "status": "published",
  "name": "Triangular Prism Calculator",
  "question": "How big is my triangular prism?",
  "summary": "Finds the volume, base area, lateral area and total surface area of a triangular prism from the three sides of its base, a base and height, or the legs of a right triangle, and its length.",
  "category": "math",
  "subcategory": "geometry",
  "url": "https://www.acalculator.org/math/triangular-prism-calculator",
  "markdown": "https://www.acalculator.org/math/triangular-prism-calculator.md",
  "kind": "function",
  "method": "V = B × L; SA = 2B + (a + b + c) × L. B = √(s(s − a)(s − b)(s − c)) with s = (a + b + c) ÷ 2 (three sides), B = ½ × b × h (base and height), or B = ½ × a × b with c = √(a² + b²) (right triangle).",
  "assumptions": [
    "The prism is a right prism: the rectangular faces are at right angles to the two equal triangular ends.",
    "All lengths are in the same unit; areas come out in that unit squared and the volume in that unit cubed.",
    "With a base and height only, the other two sides are unknown, so the page gives the volume and base area but not the surface area."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "by": {
        "title": "Triangle known by",
        "description": "How you know the triangular base: its three sides, a base and height, or the legs of a right triangle.",
        "type": "string",
        "enum": [
          "sides",
          "base",
          "right"
        ]
      },
      "a": {
        "title": "Side a",
        "description": "One side of the triangle (a leg, for a right triangle).",
        "type": "number",
        "exclusiveMinimum": 0,
        "maximum": 1000000
      },
      "b": {
        "title": "Side b (base)",
        "description": "The base side of the triangle (the other leg, for a right triangle).",
        "type": "number",
        "exclusiveMinimum": 0,
        "maximum": 1000000
      },
      "c": {
        "title": "Side c",
        "description": "The third side of the triangle.",
        "type": "number",
        "exclusiveMinimum": 0,
        "maximum": 1000000
      },
      "h": {
        "title": "Triangle height",
        "description": "The height of the triangle, at right angles to side b.",
        "type": "number",
        "exclusiveMinimum": 0,
        "maximum": 1000000
      },
      "l": {
        "title": "Prism length",
        "description": "The length of the prism: the distance between its two triangular ends.",
        "type": "number",
        "exclusiveMinimum": 0,
        "maximum": 1000000
      }
    }
  },
  "outputs": {
    "volume": {
      "label": "Volume",
      "description": "Base area × prism length, in cubic units.",
      "format": "number"
    },
    "baseArea": {
      "label": "Base area",
      "description": "The area of one triangular end, in square units.",
      "format": "number"
    },
    "perimeter": {
      "label": "Base perimeter",
      "description": "a + b + c, the distance around the triangle.",
      "format": "number"
    },
    "lateral": {
      "label": "Lateral area",
      "description": "The three rectangular faces: perimeter × prism length.",
      "format": "number"
    },
    "surface": {
      "label": "Total surface area",
      "description": "Two triangular ends plus the lateral area: 2 × base area + perimeter × length.",
      "format": "number"
    },
    "hypotenuse": {
      "label": "Hypotenuse",
      "description": "The long side of a right triangle: √(a² + b²).",
      "format": "number"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "by": "sides",
      "a": 3,
      "b": 4,
      "c": 5,
      "h": 6,
      "l": 10
    },
    "outputs": {
      "volume": 60,
      "baseArea": 6,
      "perimeter": 12,
      "lateral": 120,
      "surface": 132
    },
    "text": "A triangular prism 10 long with a base area of 6 has a volume of 60."
  },
  "examples": [
    {
      "given": {
        "by": "base",
        "b": 12,
        "h": 6,
        "l": 10
      },
      "expect": {
        "baseArea": 36,
        "volume": 360
      },
      "source": "OpenStax, Contemporary Mathematics, §10.7 Volume and Surface Area (right prism: V = B × h, SA = 2B + ph), https://openstax.org/books/contemporary-mathematics/pages/10-7-volume-and-surface-area (Example 10.57: base area ½ × 12 × 6 = 36 in²); hand calculation in content.mdx: V = 36 × 10 = 360 in³"
    },
    {
      "given": {
        "by": "sides",
        "a": 10,
        "b": 15,
        "c": 7,
        "l": 20
      },
      "expect": {
        "baseArea": 29.393876913398138,
        "volume": 587.8775382679628,
        "perimeter": 32,
        "lateral": 640
      },
      "source": "OpenStax, Algebra and Trigonometry 2e, §10.2 Non-right Triangles: Law of Cosines (Heron’s formula), https://openstax.org/books/algebra-and-trigonometry-2e/pages/10-2-non-right-triangles-law-of-cosines (s = 16, area = √(16 × 6 × 1 × 9) ≈ 29.4); OpenStax, Contemporary Mathematics, §10.7 Volume and Surface Area (right prism: V = B × h, SA = 2B + ph), https://openstax.org/books/contemporary-mathematics/pages/10-7-volume-and-surface-area; hand calculation in content.mdx",
      "tolerance": 1e-12
    },
    {
      "given": {
        "by": "right",
        "a": 3,
        "b": 4,
        "l": 10
      },
      "expect": {
        "hypotenuse": 5,
        "baseArea": 6,
        "volume": 60,
        "perimeter": 12,
        "lateral": 120,
        "surface": 132
      },
      "source": "OpenStax, Contemporary Mathematics, §10.7 Volume and Surface Area (right prism: V = B × h, SA = 2B + ph), https://openstax.org/books/contemporary-mathematics/pages/10-7-volume-and-surface-area; hand calculation in content.mdx: c = √(9 + 16) = 5, B = 6, SA = 2 × 6 + 12 × 10 = 132"
    },
    {
      "given": {
        "by": "sides",
        "a": 2.5,
        "b": 2.5,
        "c": 2.5,
        "l": 4
      },
      "expect": {
        "baseArea": 2.7063293868263707,
        "volume": 10.825317547305483,
        "surface": 35.412658773652744
      },
      "source": "OpenStax, Algebra and Trigonometry 2e, §10.2 Non-right Triangles: Law of Cosines (Heron’s formula), https://openstax.org/books/algebra-and-trigonometry-2e/pages/10-2-non-right-triangles-law-of-cosines; OpenStax, Contemporary Mathematics, §10.7 Volume and Surface Area (right prism: V = B × h, SA = 2B + ph), https://openstax.org/books/contemporary-mathematics/pages/10-7-volume-and-surface-area; hand calculation in content.mdx: B = (√3 ÷ 4) × 2.5² ≈ 2.7063",
      "tolerance": 1e-12
    }
  ],
  "sources": [
    "OpenStax, Contemporary Mathematics, §10.7 Volume and Surface Area: right prism SA = 2B + ph and V = B·h; Example 10.57 (triangle base 12 in, height 6 in, length 10 in). https://openstax.org/books/contemporary-mathematics/pages/10-7-volume-and-surface-area (retrieved 2026-10-01)",
    "OpenStax, Algebra and Trigonometry 2e, §10.2 Non-right Triangles: Law of Cosines, Heron’s formula and its example with sides 10, 15 and 7. https://openstax.org/books/algebra-and-trigonometry-2e/pages/10-2-non-right-triangles-law-of-cosines (retrieved 2026-10-01)"
  ],
  "related": [
    "volume",
    "surface-area",
    "triangle-area",
    "pythagorean-theorem"
  ],
  "changelog": []
}
