{
  "id": "parabola",
  "version": "f15d40d48284",
  "status": "published",
  "name": "Parabola Calculator",
  "question": "What is the focus of my parabola?",
  "summary": "Finds a parabola’s vertex, focus, directrix, axis of symmetry and latus rectum from y = ax² + bx + c, x = ay² + by + c, or the standard form (x − h)² = 4p(y − k), with both equations and a graph.",
  "category": "math",
  "subcategory": "algebra",
  "url": "https://www.acalculator.org/math/parabola-calculator",
  "markdown": "https://www.acalculator.org/math/parabola-calculator.md",
  "kind": "function",
  "method": "Up or down: (x − h)² = 4p(y − k), focus (h, k + p), directrix y = k − p. Left or right: (y − k)² = 4p(x − h), focus (h + p, k), directrix x = h − p. From a, b, c: p = 1 ÷ (4a), vertex along the axis −b ÷ (2a), across it c − b² ÷ (4a).",
  "assumptions": [
    "The axis of the parabola is vertical or horizontal (no rotated parabolas).",
    "Coefficients are read as the exact decimals typed, so every answer is an exact fraction."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "axis": {
        "title": "Opens",
        "description": "Up or down (y in terms of x), or left or right (x in terms of y).",
        "type": "string",
        "enum": [
          "vertical",
          "horizontal"
        ]
      },
      "form": {
        "title": "I know",
        "description": "The coefficients a, b, c, or the vertex (h, k) and p.",
        "type": "string",
        "enum": [
          "standard",
          "vertex"
        ]
      },
      "a": {
        "title": "a",
        "description": "The coefficient of the squared term. It may not be 0.",
        "type": "number",
        "minimum": -1000000,
        "maximum": 1000000
      },
      "b": {
        "title": "b",
        "description": "The coefficient of the first-power term.",
        "type": "number",
        "minimum": -1000000,
        "maximum": 1000000
      },
      "c": {
        "title": "c",
        "description": "The constant term.",
        "type": "number",
        "minimum": -1000000,
        "maximum": 1000000
      },
      "h": {
        "title": "h",
        "description": "The x-coordinate of the vertex.",
        "type": "number",
        "minimum": -1000000,
        "maximum": 1000000
      },
      "k": {
        "title": "k",
        "description": "The y-coordinate of the vertex.",
        "type": "number",
        "minimum": -1000000,
        "maximum": 1000000
      },
      "p": {
        "title": "p",
        "description": "The signed distance from the vertex to the focus. It may not be 0.",
        "type": "number",
        "minimum": -1000000,
        "maximum": 1000000
      }
    }
  },
  "outputs": {
    "focus": {
      "label": "Focus",
      "description": "The focus, as exact fractions.",
      "format": "text"
    },
    "vertex": {
      "label": "Vertex",
      "description": "The turning point (h, k).",
      "format": "text"
    },
    "directrix": {
      "label": "Directrix",
      "description": "The line the parabola keeps the same distance from as from the focus.",
      "format": "text"
    },
    "axisLine": {
      "label": "Axis of symmetry",
      "description": "The line through the vertex and the focus.",
      "format": "text"
    },
    "opens": {
      "label": "Opens",
      "description": "Which way the parabola opens.",
      "format": "text"
    },
    "pValue": {
      "label": "p",
      "description": "The signed distance from the vertex to the focus: 1 ÷ (4a).",
      "format": "number"
    },
    "latus": {
      "label": "Latus rectum length",
      "description": "|4p|: the width of the parabola at the focus.",
      "format": "number"
    },
    "ends": {
      "label": "Latus rectum endpoints",
      "description": "Where the chord through the focus, parallel to the directrix, meets the parabola.",
      "format": "text"
    },
    "standard": {
      "label": "Equation in a, b, c",
      "description": "y = ax² + bx + c, or x = ay² + by + c.",
      "format": "text"
    },
    "vertexEq": {
      "label": "Standard form",
      "description": "(x − h)² = 4p(y − k), or (y − k)² = 4p(x − h).",
      "format": "text"
    },
    "hx": {
      "label": "h (vertex x)",
      "description": "The x-coordinate of the vertex, as a decimal.",
      "format": "number"
    },
    "ky": {
      "label": "k (vertex y)",
      "description": "The y-coordinate of the vertex, as a decimal.",
      "format": "number"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "axis": "vertical",
      "form": "standard",
      "a": 2,
      "b": -6,
      "c": 7,
      "h": 4,
      "k": -8,
      "p": 7
    },
    "outputs": {
      "focus": "(3/2, 21/8)",
      "vertex": "(3/2, 5/2)",
      "directrix": "y = 19/8",
      "axisLine": "x = 3/2",
      "opens": "Up",
      "pValue": 0.125,
      "latus": 0.5,
      "ends": "(5/4, 21/8) and (7/4, 21/8)",
      "standard": "y = 2x² − 6x + 7",
      "vertexEq": "(x − 3/2)² = (1/2)(y − 5/2)",
      "hx": 1.5,
      "ky": 2.5
    },
    "text": "The parabola y = 2x² − 6x + 7 has its focus at (3/2, 21/8) and its directrix at y = 19/8."
  },
  "examples": [
    {
      "given": {
        "axis": "vertical",
        "form": "vertex",
        "h": 4,
        "k": -8,
        "p": 7
      },
      "expect": {
        "vertex": "(4, −8)",
        "focus": "(4, −1)",
        "directrix": "y = −15",
        "axisLine": "x = 4",
        "ends": "(−10, −1) and (18, −1)",
        "vertexEq": "(x − 4)² = 28(y + 8)",
        "standard": "y = (1/28)x² − (2/7)x − 52/7"
      },
      "source": "OpenStax, Algebra and Trigonometry 2e, §12.3 The Parabola (standard forms (x − h)² = 4p(y − k) with focus (h, k + p) and directrix y = k − p, and (y − k)² = 4p(x − h) with focus (h + p, k) and directrix x = h − p; latus rectum endpoints (h ± 2p, k + p) and (h + p, k ± 2p)), https://openstax.org/books/algebra-and-trigonometry-2e/pages/12-3-the-parabola (retrieved 2026-10-02) (Example 5: vertex (4, −8), focus (4, −1), directrix y = −15, endpoints (−10, −1) and (18, −1))"
    },
    {
      "given": {
        "axis": "horizontal",
        "form": "vertex",
        "h": -3,
        "k": 1,
        "p": -4
      },
      "expect": {
        "focus": "(−7, 1)",
        "directrix": "x = 1",
        "axisLine": "y = 1",
        "opens": "Left",
        "ends": "(−7, −7) and (−7, 9)",
        "vertexEq": "(y − 1)² = −16(x + 3)",
        "latus": 16
      },
      "source": "OpenStax, Algebra and Trigonometry 2e, §12.3 The Parabola (standard forms (x − h)² = 4p(y − k) with focus (h, k + p) and directrix y = k − p, and (y − k)² = 4p(x − h) with focus (h + p, k) and directrix x = h − p; latus rectum endpoints (h ± 2p, k + p) and (h + p, k ± 2p)), https://openstax.org/books/algebra-and-trigonometry-2e/pages/12-3-the-parabola (retrieved 2026-10-02) (Example 4: vertex (−3, 1), focus (−7, 1), directrix x = 1, endpoints (−7, −7) and (−7, 9))"
    },
    {
      "given": {
        "axis": "horizontal",
        "form": "vertex",
        "h": 0,
        "k": 0,
        "p": 6
      },
      "expect": {
        "focus": "(6, 0)",
        "directrix": "x = −6",
        "ends": "(6, −12) and (6, 12)",
        "vertexEq": "y² = 24x"
      },
      "source": "OpenStax, Algebra and Trigonometry 2e, §12.3 The Parabola (standard forms (x − h)² = 4p(y − k) with focus (h, k + p) and directrix y = k − p, and (y − k)² = 4p(x − h) with focus (h + p, k) and directrix x = h − p; latus rectum endpoints (h ± 2p, k + p) and (h + p, k ± 2p)), https://openstax.org/books/algebra-and-trigonometry-2e/pages/12-3-the-parabola (retrieved 2026-10-02) (Example 1: y² = 24x, p = 6, focus (6, 0), directrix x = −6, endpoints (6, ±12))"
    },
    {
      "given": {
        "axis": "vertical",
        "form": "standard",
        "a": 2,
        "b": -6,
        "c": 7
      },
      "expect": {
        "vertex": "(3/2, 5/2)",
        "focus": "(3/2, 21/8)",
        "directrix": "y = 19/8",
        "pValue": 0.125,
        "vertexEq": "(x − 3/2)² = (1/2)(y − 5/2)"
      },
      "source": "OpenStax, Algebra and Trigonometry 2e, §12.3 The Parabola (standard forms (x − h)² = 4p(y − k) with focus (h, k + p) and directrix y = k − p, and (y − k)² = 4p(x − h) with focus (h + p, k) and directrix x = h − p; latus rectum endpoints (h ± 2p, k + p) and (h + p, k ± 2p)), https://openstax.org/books/algebra-and-trigonometry-2e/pages/12-3-the-parabola (retrieved 2026-10-02); hand calculation in content.mdx: h = 6 ÷ 4 = 3/2, k = 7 − 36 ÷ 8 = 5/2, p = 1 ÷ 8; focus k + p = 21/8, directrix k − p = 19/8"
    }
  ],
  "sources": [
    "OpenStax, Algebra and Trigonometry 2e, §12.3 The Parabola (a parabola is the set of points equidistant from a fixed line, the directrix, and a fixed point, the focus; standard forms (x − h)² = 4p(y − k), focus (h, k + p), directrix y = k − p, latus rectum endpoints (h ± 2p, k + p); (y − k)² = 4p(x − h), focus (h + p, k), directrix x = h − p, endpoints (h + p, k ± 2p); Examples 1, 4 and 5). https://openstax.org/books/algebra-and-trigonometry-2e/pages/12-3-the-parabola (retrieved 2026-10-02)"
  ],
  "related": [
    "vertex",
    "quadratic-formula",
    "slope",
    "circle"
  ],
  "changelog": []
}
