{
  "id": "sphere",
  "version": "587420afabc3",
  "status": "published",
  "name": "Sphere Calculator",
  "question": "How big is my sphere?",
  "summary": "Finds the radius, diameter, circumference, surface area, and volume of a sphere from any one of them, with A = 4πr² and V = 4/3 πr³.",
  "category": "math",
  "subcategory": "geometry",
  "url": "https://www.acalculator.org/math/sphere-calculator",
  "markdown": "https://www.acalculator.org/math/sphere-calculator.md",
  "kind": "formulas",
  "method": "d = 2r, C = 2πr, A = 4πr², and V = 4/3 πr³, where r is the radius.",
  "assumptions": [
    "π is the full-precision value 3.141592653589793…, not 3.14 or 22/7.",
    "The sphere is perfect: every point of the surface is the same distance r from the centre.",
    "Each box has its own unit; each value must be greater than 0."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "r": {
        "title": "Radius",
        "description": "The distance from the centre of the sphere to its surface.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "exclusiveMinimum": 0,
        "maximum": 1e+100
      },
      "d": {
        "title": "Diameter",
        "description": "The distance across the sphere through its centre: 2r.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "exclusiveMinimum": 0,
        "maximum": 2e+100
      },
      "c": {
        "title": "Circumference",
        "description": "The distance around the sphere at its widest (a great circle): 2πr.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "exclusiveMinimum": 0,
        "maximum": 7e+100
      },
      "a": {
        "title": "Surface area",
        "description": "The area of the whole surface: 4πr².",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "area",
        "exclusiveMinimum": 0,
        "maximum": 1.3e+201
      },
      "v": {
        "title": "Volume",
        "description": "The space inside the sphere: 4/3 πr³.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "volume",
        "exclusiveMinimum": 0,
        "maximum": 4.2e+300
      }
    }
  },
  "solve": {
    "fillAny": 1,
    "variables": [
      "r",
      "d",
      "c",
      "a",
      "v"
    ],
    "inputsOnly": []
  },
  "outputs": {
    "r": {
      "label": "Radius",
      "description": "The distance from the centre of the sphere to its surface.",
      "format": "quantity",
      "unit": "in"
    },
    "d": {
      "label": "Diameter",
      "description": "The distance across the sphere through its centre: 2r.",
      "format": "quantity",
      "unit": "in"
    },
    "c": {
      "label": "Circumference",
      "description": "The distance around the sphere at its widest: 2πr.",
      "format": "quantity",
      "unit": "in"
    },
    "a": {
      "label": "Surface area",
      "description": "The area of the whole surface: 4πr².",
      "format": "quantity",
      "unit": "in2"
    },
    "v": {
      "label": "Volume",
      "description": "The space inside the sphere: 4/3 πr³.",
      "format": "quantity",
      "unit": "cm3"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "r": 0.127
    },
    "outputs": {
      "d": 0.254,
      "c": 0.7979645340118074,
      "a": 0.20268299163899908,
      "v": 0.00858024664605096
    },
    "text": "A sphere of radius 5 in has a surface area of 314.159265 in² and a volume of 8,580.246646 cm³."
  },
  "examples": [
    {
      "given": {
        "r": 5
      },
      "expect": {
        "d": 10,
        "c": 31.41592653589793,
        "a": 314.1592653589793,
        "v": 523.5987755982989
      },
      "source": "OpenStax, Prealgebra 2e, §9.6, sphere volume and surface area (https://openstax.org/books/prealgebra-2e/pages/9-6-solve-geometry-applications-volume-and-surface-area); hand calculation in content.mdx: A = 4π × 25 = 100π, V = 4/3 π × 125 = 500π/3; Python 3: 100*math.pi, 4/3*math.pi*125"
    },
    {
      "given": {
        "d": 12
      },
      "expect": {
        "r": 6,
        "a": 452.3893421169302,
        "v": 904.7786842338604
      },
      "source": "hand calculation in content.mdx: r = 6, A = 144π, V = 288π; Python 3: 144*math.pi, 288*math.pi"
    },
    {
      "given": {
        "v": 1000
      },
      "expect": {
        "r": 6.203504908994,
        "a": 483.59758620494085
      },
      "source": "hand calculation in content.mdx: r = ∛(3V ÷ 4π); Python 3: (3000/(4*math.pi))**(1/3), 4*math.pi*r**2"
    },
    {
      "given": {
        "a": 100
      },
      "expect": {
        "r": 2.8209479177387813,
        "v": 94.03159725795935
      },
      "source": "hand calculation in content.mdx: r = √(A ÷ 4π); Python 3: math.sqrt(100/(4*math.pi)), 4/3*math.pi*r**3"
    },
    {
      "given": {
        "c": 40075016.686
      },
      "expect": {
        "r": 6378137.000067086
      },
      "source": "hand calculation in content.mdx: the WGS 84 equator, 40,075,016.686 m (2π × 6,378,137 m), gives r = C ÷ 2π; Python 3: 40075016.686/(2*math.pi)"
    }
  ],
  "sources": [
    "OpenStax, Prealgebra 2e, §9.6 Solve Geometry Applications: Volume and Surface Area (sphere: V = 4/3 πr³, S = 4πr²). https://openstax.org/books/prealgebra-2e/pages/9-6-solve-geometry-applications-volume-and-surface-area",
    "NIST Digital Library of Mathematical Functions, §3.12 Mathematical Constants (π = 3.14159 26535 89793…). https://dlmf.nist.gov/3.12",
    "NIST Special Publication 811 (2008), Appendix B: 1 in = 0.0254 m exactly, for unit conversions.",
    "NGA, World Geodetic System 1984, NGA.STND.0036 (equatorial radius 6,378,137 m). https://earth-info.nga.mil/"
  ],
  "related": [
    "circle",
    "volume",
    "surface-area",
    "cylinder-volume"
  ],
  "changelog": []
}
