{
  "id": "area-of-a-circle",
  "version": "4e48a360265c",
  "status": "published",
  "name": "Area of a Circle Calculator",
  "question": "What is the area of a circle?",
  "summary": "Finds the area of a circle from its radius or diameter (A = πr²), or the radius and diameter from the area.",
  "category": "math",
  "subcategory": "geometry",
  "url": "https://www.acalculator.org/math/area-of-a-circle-calculator",
  "markdown": "https://www.acalculator.org/math/area-of-a-circle-calculator.md",
  "kind": "formulas",
  "method": "A = πr², where r is the radius; with the diameter d = 2r, A = πd² ÷ 4.",
  "assumptions": [
    "π is the full-precision value 3.141592653589793…, not 3.14 or 22/7.",
    "The radius and diameter are in the length unit shown next to them, and the area is in the square unit shown next to it.",
    "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 circle to its edge.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "exclusiveMinimum": 0
      },
      "d": {
        "title": "Diameter",
        "description": "The distance across the circle through its centre: twice the radius.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "exclusiveMinimum": 0
      },
      "a": {
        "title": "Area",
        "description": "The space inside the circle.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "area",
        "exclusiveMinimum": 0
      }
    }
  },
  "solve": {
    "fillAny": 1,
    "variables": [
      "r",
      "d",
      "a"
    ],
    "inputsOnly": []
  },
  "outputs": {
    "r": {
      "label": "Radius",
      "description": "The distance from the centre of the circle to its edge.",
      "format": "quantity"
    },
    "d": {
      "label": "Diameter",
      "description": "The distance across the circle through its centre: twice the radius.",
      "format": "quantity"
    },
    "a": {
      "label": "Area",
      "description": "The space inside the circle.",
      "format": "quantity"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "r": 0.127
    },
    "outputs": {
      "d": 0.254,
      "a": 0.05067074790974977
    },
    "text": "A circle of radius 5 in (diameter 10 in) has an area of 78.54 in²."
  },
  "examples": [
    {
      "given": {
        "r": 5
      },
      "expect": {
        "a": 78.53981633974483,
        "d": 10
      },
      "source": "hand calculation in content.mdx: A = π × 5² = 25π = 78.5398"
    },
    {
      "given": {
        "d": 14
      },
      "expect": {
        "a": 153.93804002589985,
        "r": 7
      },
      "source": "hand calculation in content.mdx: r = 7, A = π × 7² = 49π = 153.9380"
    },
    {
      "given": {
        "a": 100
      },
      "expect": {
        "r": 5.641895835477563,
        "d": 11.283791670955125
      },
      "source": "hand calculation in content.mdx: r = √(100 ÷ π) = 5.6419"
    }
  ],
  "sources": [
    "NIST Digital Library of Mathematical Functions, §3.12 Mathematical Constants, equation 3.12.1 (π = 3.14159 26535 89793…). https://dlmf.nist.gov/3.12",
    "OpenStax, Prealgebra 2e, §9.5 Solve Geometry Applications: Circles and Irregular Figures (A = πr²). https://openstax.org/books/prealgebra-2e/pages/9-5-solve-geometry-applications-circles-and-irregular-figures",
    "NIST Special Publication 811 (2008), Appendix B: 1 in = 0.0254 m exactly, for unit conversions."
  ],
  "related": [
    "circle",
    "circumference",
    "cylinder-volume"
  ],
  "changelog": []
}
