{
  "id": "circumference",
  "version": "d60411ca81cb",
  "status": "published",
  "name": "Circumference Calculator",
  "question": "What is the circumference of a circle?",
  "summary": "Finds the circumference of a circle from its radius or diameter (C = 2πr = πd), or the radius and diameter from the circumference.",
  "category": "math",
  "subcategory": "geometry",
  "url": "https://www.acalculator.org/math/circumference-calculator",
  "markdown": "https://www.acalculator.org/math/circumference-calculator.md",
  "kind": "formulas",
  "method": "C = 2πr = πd, where r is the radius and d = 2r is the diameter.",
  "assumptions": [
    "π is the full-precision value 3.141592653589793…, not 3.14 or 22/7.",
    "Every length is in the 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.",
        "type": [
          "number",
          "string"
        ],
        "x-quantity": "length",
        "exclusiveMinimum": 0
      }
    }
  },
  "solve": {
    "fillAny": 1,
    "variables": [
      "r",
      "d",
      "c"
    ],
    "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.",
      "format": "quantity"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "r": 0.127
    },
    "outputs": {
      "d": 0.254,
      "c": 0.7979645340118074
    },
    "text": "A circle of radius 5 in (diameter 10 in) has a circumference of 31.42 in."
  },
  "examples": [
    {
      "given": {
        "r": 5
      },
      "expect": {
        "c": 31.41592653589793,
        "d": 10
      },
      "source": "hand calculation in content.mdx: C = 2 × π × 5 = 10π = 31.4159"
    },
    {
      "given": {
        "d": 8
      },
      "expect": {
        "c": 25.132741228718345,
        "r": 4
      },
      "source": "hand calculation in content.mdx: C = π × 8 = 25.1327"
    },
    {
      "given": {
        "c": 44
      },
      "expect": {
        "d": 14.00563499208679,
        "r": 7.002817496043395
      },
      "source": "hand calculation in content.mdx: d = 44 ÷ π = 14.0056 (with π ≈ 22/7 it would be exactly 14)"
    }
  ],
  "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 and C = πd). 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",
    "area-of-a-circle",
    "cylinder-volume"
  ],
  "changelog": []
}
