{
  "id": "surface-area",
  "version": "24fd24accc7b",
  "status": "published",
  "name": "Surface Area Calculator",
  "question": "What is the surface area of a solid?",
  "summary": "Finds the total, side (lateral), and base surface area of a cube, rectangular box, sphere, cylinder, cone, or square pyramid from its dimensions.",
  "category": "math",
  "subcategory": "geometry",
  "url": "https://www.acalculator.org/math/surface-area-calculator",
  "markdown": "https://www.acalculator.org/math/surface-area-calculator.md",
  "kind": "function",
  "method": "Cube 6a²; box 2(lw + lh + wh); sphere 4πr²; cylinder 2πr² + 2πrh; cone πr² + πrs with s = √(r² + h²); square pyramid a² + 2as with s = √(h² + (a/2)²).",
  "assumptions": [
    "Every length is in one unit, and each area is in that unit squared.",
    "The cylinder and cone are right circular (the tip or top is straight above the centre of the base), and the pyramid is a right pyramid with a square base.",
    "The total includes every base: both ends of a cylinder, the base of a cone or pyramid, and all six faces of a cube or box.",
    "Each length must be greater than 0."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "shape": {
        "title": "Shape",
        "description": "The solid: cube, rectangular box, sphere, cylinder, cone, or square pyramid.",
        "type": "string",
        "enum": [
          "cube",
          "box",
          "sphere",
          "cylinder",
          "cone",
          "pyramid"
        ]
      },
      "a": {
        "title": "Edge length",
        "description": "The length of an edge of the cube, or of the square base of the pyramid.",
        "type": "number",
        "exclusiveMinimum": 0
      },
      "l": {
        "title": "Length",
        "description": "The length of the rectangular box.",
        "type": "number",
        "exclusiveMinimum": 0
      },
      "w": {
        "title": "Width",
        "description": "The width of the rectangular box.",
        "type": "number",
        "exclusiveMinimum": 0
      },
      "r": {
        "title": "Radius",
        "description": "The radius of the sphere, or of the circular base.",
        "type": "number",
        "exclusiveMinimum": 0
      },
      "h": {
        "title": "Height",
        "description": "The vertical height: of the box, between the ends of the cylinder, or from the base to the tip.",
        "type": "number",
        "exclusiveMinimum": 0
      }
    }
  },
  "outputs": {
    "total": {
      "label": "Total surface area",
      "description": "The area of every face and curved surface added together.",
      "format": "number"
    },
    "lateral": {
      "label": "Side (lateral) area",
      "description": "The area of the sides only, without the top and bottom faces or the base.",
      "format": "number"
    },
    "base": {
      "label": "Base area",
      "description": "The area of one base: the bottom face or circle.",
      "format": "number"
    },
    "slant": {
      "label": "Slant height",
      "description": "For a cone or a pyramid: the distance up the side from the edge of the base to the tip.",
      "format": "number"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "shape": "cylinder",
      "a": 2,
      "l": 14,
      "w": 9,
      "r": 3,
      "h": 5
    },
    "outputs": {
      "total": 150.79644737231007,
      "lateral": 94.24777960769379,
      "base": 28.274333882308138
    },
    "text": "Cylinder: total surface area 150.796447."
  },
  "examples": [
    {
      "given": {
        "shape": "cylinder",
        "r": 3,
        "h": 5
      },
      "expect": {
        "total": 150.79644737231007,
        "lateral": 94.24777960769379,
        "base": 28.274333882308138
      },
      "source": "OpenStax Prealgebra 2e, Example 9.53 (150.72 with π ≈ 3.14); hand calculation in content.mdx: 2π × 3² + 2π × 3 × 5 = 48π"
    },
    {
      "given": {
        "shape": "box",
        "l": 14,
        "w": 9,
        "h": 17
      },
      "expect": {
        "total": 1034,
        "lateral": 782,
        "base": 126
      },
      "source": "OpenStax Prealgebra 2e, Example 9.47: 2 × 14 × 17 + 2 × 14 × 9 + 2 × 9 × 17 = 1,034"
    },
    {
      "given": {
        "shape": "cube",
        "a": 2.5
      },
      "expect": {
        "total": 37.5,
        "lateral": 25,
        "base": 6.25
      },
      "source": "OpenStax Prealgebra 2e, Example 9.49: 6 × 2.5² = 37.5"
    },
    {
      "given": {
        "shape": "sphere",
        "r": 6
      },
      "expect": {
        "total": 452.3893421169302
      },
      "source": "OpenStax Prealgebra 2e, Example 9.51 (452.16 with π ≈ 3.14); hand calculation in content.mdx: 4π × 6² = 144π"
    },
    {
      "given": {
        "shape": "cone",
        "r": 3,
        "h": 4
      },
      "expect": {
        "slant": 5,
        "lateral": 47.12388980384689,
        "base": 28.274333882308138,
        "total": 75.39822368615503
      },
      "source": "OpenStax Calculus Volume 2, section 2.4 (lateral area πrs); hand calculation in content.mdx: s = √(3² + 4²) = 5, π × 3 × 5 + π × 3² = 24π"
    },
    {
      "given": {
        "shape": "pyramid",
        "a": 6,
        "h": 4
      },
      "expect": {
        "slant": 5,
        "lateral": 60,
        "base": 36,
        "total": 96
      },
      "source": "hand calculation in content.mdx: slant = √(4² + 3²) = 5; 4 triangles of ½ × 6 × 5 = 60; 60 + 6² = 96"
    }
  ],
  "sources": [
    "OpenStax, Prealgebra 2e, §9.6 Solve Geometry Applications: Volume and Surface Area (rectangular solid, cube, sphere, and cylinder surface areas; Examples 9.47, 9.49, 9.51, 9.53). https://openstax.org/books/prealgebra-2e/pages/9-6-solve-geometry-applications-volume-and-surface-area",
    "OpenStax, Calculus Volume 2, §2.4 Arc Length of a Curve and Surface Area (lateral surface area of a right circular cone, πrs). https://openstax.org/books/calculus-volume-2/pages/2-4-arc-length-of-a-curve-and-surface-area",
    "NIST Digital Library of Mathematical Functions, §3.12 Mathematical Constants, equation 3.12.1 (π). https://dlmf.nist.gov/3.12"
  ],
  "related": [
    "cylinder-volume",
    "cone-volume",
    "circle"
  ],
  "changelog": []
}
