{
  "id": "square-root",
  "version": "c57eefc45fd3",
  "status": "published",
  "name": "Square Root Calculator",
  "question": "What is the square root of a number?",
  "summary": "Finds the square root of a number with its simplified radical form, or the number from its square root.",
  "category": "math",
  "subcategory": "arithmetic",
  "url": "https://www.acalculator.org/math/square-root-calculator",
  "markdown": "https://www.acalculator.org/math/square-root-calculator.md",
  "kind": "function",
  "method": "√x = r, where r ≥ 0 and r² = x.",
  "assumptions": [
    "Real numbers only: x must be 0 or more (the square root of a negative number is imaginary).",
    "The principal root: √x is the root that is 0 or more; −√x is the other square root.",
    "A whole number of up to 100 digits is read exactly: the perfect-square check and the root of a perfect square are exact at any such size.",
    "The simplified radical form is shown for whole numbers up to 10¹⁸, and for every perfect square.",
    "A decimal is read as a 64-bit float, about 16 significant digits."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "x": {
        "title": "Number (x)",
        "description": "The number to take the square root of, 0 or more. A whole number keeps every digit.",
        "type": "string",
        "maxLength": 150
      },
      "root": {
        "title": "Or its square root (√x)",
        "description": "Leave the number empty and type a square root, 0 or more, to get the number back.",
        "type": "number",
        "minimum": 0
      }
    }
  },
  "outputs": {
    "root": {
      "label": "Square root (√x)",
      "description": "The principal square root: the number that is 0 or more and gives x when squared.",
      "format": "number"
    },
    "number": {
      "label": "Number (x)",
      "description": "The number, with every digit as typed (or worked out from the root).",
      "format": "text"
    },
    "negative": {
      "label": "Negative square root",
      "description": "The other number whose square is x: −√x.",
      "format": "number"
    },
    "simplified": {
      "label": "Simplified radical form",
      "description": "For a whole number, √x written as k√s with s as small as possible (√72 = 6√2).",
      "format": "text"
    },
    "perfect": {
      "label": "Perfect square?",
      "description": "For a whole number, whether it is the square of a whole number.",
      "format": "boolean"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "x": "72"
    },
    "outputs": {
      "root": 8.48528137423857,
      "number": "72",
      "negative": -8.48528137423857,
      "simplified": "6√2",
      "perfect": false
    },
    "text": "The square root of 72 is 8.485281."
  },
  "examples": [
    {
      "given": {
        "x": "72"
      },
      "expect": {
        "root": 8.48528137423857,
        "negative": -8.48528137423857,
        "simplified": "6√2",
        "perfect": false
      },
      "source": "hand calculation in content.mdx: 72 = 36 × 2, so √72 = 6√2; Python 3: math.sqrt(72) = 8.48528137423857"
    },
    {
      "given": {
        "x": "144"
      },
      "expect": {
        "root": 12,
        "simplified": "12",
        "perfect": true
      },
      "source": "hand calculation in content.mdx: 12² = 144"
    },
    {
      "given": {
        "x": "2"
      },
      "expect": {
        "root": 1.4142135623730951,
        "simplified": "√2",
        "perfect": false
      },
      "source": "hand calculation in content.mdx: 2 has no square factor; Python 3: math.sqrt(2) = 1.4142135623730951"
    },
    {
      "given": {
        "root": 1.5
      },
      "expect": {
        "number": "2.25"
      },
      "source": "hand calculation in content.mdx: 1.5² = 2.25"
    },
    {
      "given": {
        "x": "0.25"
      },
      "expect": {
        "root": 0.5
      },
      "source": "hand calculation in content.mdx: 0.5² = 0.25"
    },
    {
      "given": {
        "x": "12345678987654321"
      },
      "expect": {
        "root": 111111111,
        "number": "12,345,678,987,654,321",
        "simplified": "111111111",
        "perfect": true
      },
      "source": "hand calculation in content.mdx: 111,111,111² = 12,345,678,987,654,321; Python 3: math.isqrt(12345678987654321) = 111111111"
    },
    {
      "given": {
        "x": "1800"
      },
      "expect": {
        "root": 42.42640687119285,
        "simplified": "30√2"
      },
      "source": "hand calculation in content.mdx: 1,800 = 900 × 2, so √1,800 = 30√2; Python 3: math.sqrt(1800) = 42.42640687119285"
    }
  ],
  "sources": [
    "OpenStax, Elementary Algebra 2e, section 9.1 Simplify and Use Square Roots: https://openstax.org/books/elementary-algebra-2e/pages/9-1-simplify-and-use-square-roots",
    "OpenStax, Elementary Algebra 2e, section 9.2 Simplify Square Roots: https://openstax.org/books/elementary-algebra-2e/pages/9-2-simplify-square-roots"
  ],
  "related": [
    "root",
    "cube-root",
    "exponent",
    "pythagorean-theorem"
  ],
  "changelog": [
    {
      "date": "2026-09-28",
      "note": "A whole number is read exactly (BigInt) up to 100 digits, so 12345678987654321 stays a perfect square; radical form up to 10^18."
    }
  ]
}
