{
  "id": "circle",
  "version": "702986190c7e",
  "status": "published",
  "name": "Circle Calculator",
  "question": "What are my circle's measurements?",
  "summary": "Finds the radius, diameter, circumference, and area of a circle from any one of them, with C = 2πr and A = πr².",
  "category": "math",
  "subcategory": "geometry",
  "url": "https://www.acalculator.org/math/circle-calculator",
  "markdown": "https://www.acalculator.org/math/circle-calculator.md",
  "kind": "formulas",
  "method": "d = 2r, C = 2πr = πd, and A = πr², where r is the radius.",
  "assumptions": [
    "π is the full-precision value 3.141592653589793…, not 3.14 or 22/7.",
    "Every length is in the unit shown next to it, 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
      },
      "c": {
        "title": "Circumference",
        "description": "The distance around the circle: its perimeter.",
        "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",
      "c",
      "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"
    },
    "c": {
      "label": "Circumference",
      "description": "The distance around the circle: its perimeter.",
      "format": "quantity"
    },
    "a": {
      "label": "Area",
      "description": "The space inside the circle.",
      "format": "quantity"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "r": 0.127
    },
    "outputs": {
      "d": 0.254,
      "c": 0.7979645340118074,
      "a": 0.05067074790974977
    },
    "text": "A circle of radius 5 in has a diameter of 10 in, a circumference of 31.42 in, and an area of 78.54 in²."
  },
  "examples": [
    {
      "given": {
        "r": 5
      },
      "expect": {
        "d": 10,
        "c": 31.41592653589793,
        "a": 78.53981633974483
      },
      "source": "hand calculation in content.mdx: d = 2 × 5 = 10, C = 2π × 5 = 31.4159, A = π × 5² = 78.5398"
    },
    {
      "given": {
        "d": 12
      },
      "expect": {
        "r": 6,
        "c": 37.69911184307752,
        "a": 113.09733552923255
      },
      "source": "hand calculation in content.mdx: r = 12 ÷ 2 = 6, C = π × 12 = 37.6991, A = π × 6² = 113.0973"
    },
    {
      "given": {
        "c": 100
      },
      "expect": {
        "r": 15.915494309189533,
        "d": 31.830988618379067,
        "a": 795.7747154594766
      },
      "source": "hand calculation in content.mdx: r = 100 ÷ 2π = 15.9155, A = C² ÷ 4π = 795.7747"
    },
    {
      "given": {
        "a": 50
      },
      "expect": {
        "r": 3.989422804014327,
        "d": 7.978845608028654,
        "c": 25.066282746310005
      },
      "source": "hand calculation in content.mdx: r = √(50 ÷ π) = 3.9894, C = 2√(πA) = 25.0663"
    }
  ],
  "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 (C = 2πr, C = πd, 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": [
    "circumference",
    "area-of-a-circle",
    "cylinder-volume"
  ],
  "changelog": []
}
