{
  "id": "slope-intercept-form",
  "version": "4bddcd50a02c",
  "status": "published",
  "name": "Y Intercept Calculator",
  "question": "What is the y intercept of my line?",
  "summary": "Finds the y-intercept b of a line, where it crosses the y axis, and its x-intercept, from two points, a slope and a point, or Ax + By = C, in exact fractions with a graph.",
  "category": "math",
  "subcategory": "algebra",
  "url": "https://www.acalculator.org/math/slope-intercept-form-calculator",
  "markdown": "https://www.acalculator.org/math/slope-intercept-form-calculator.md",
  "kind": "function",
  "method": "m = (y₂ − y₁) ÷ (x₂ − x₁) (or the slope as typed), b = y₁ − m × x₁; from Ax + By = C, m = −A ÷ B and b = C ÷ B. The y-intercept is (0, b) and the x-intercept is (−b ÷ m, 0); all in exact fractions.",
  "assumptions": [
    "Every number is read exactly as typed: 0.1 is 1/10, so the intercepts are exact fractions.",
    "A vertical line (two points with the same x, or B = 0) has no y-intercept here; a flat line (m = 0) has no x-intercept, except y = 0, which is the x axis.",
    "y at x is shown when it is at most 10³⁰⁰ in size."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "given": {
        "title": "I know",
        "description": "What you know about the line: two points on it, its slope and one point, or its standard form.",
        "type": "string",
        "enum": [
          "points",
          "slope",
          "standard"
        ]
      },
      "x1": {
        "title": "x₁",
        "description": "The x coordinate of a point on the line.",
        "type": "number"
      },
      "y1": {
        "title": "y₁",
        "description": "The y coordinate of the same point.",
        "type": "number"
      },
      "x2": {
        "title": "x₂",
        "description": "The x coordinate of a second point on the line.",
        "type": "number"
      },
      "y2": {
        "title": "y₂",
        "description": "The y coordinate of the second point.",
        "type": "number"
      },
      "m": {
        "title": "Slope (m)",
        "description": "How much y changes when x goes up by 1.",
        "type": "number"
      },
      "a": {
        "title": "A",
        "description": "The number in front of x in Ax + By = C.",
        "type": "number"
      },
      "b": {
        "title": "B",
        "description": "The number in front of y in Ax + By = C.",
        "type": "number"
      },
      "c": {
        "title": "C",
        "description": "The number on the right of Ax + By = C.",
        "type": "number"
      },
      "x": {
        "title": "x",
        "description": "Optional: an x value at which to read y on the line.",
        "type": "number"
      }
    }
  },
  "outputs": {
    "intercept": {
      "label": "y-intercept b",
      "description": "Where the line crosses the y axis: the value of y at x = 0.",
      "format": "number"
    },
    "yPoint": {
      "label": "y-intercept point",
      "description": "The point (0, b) where the line crosses the y axis, as exact fractions.",
      "format": "text"
    },
    "xIntercept": {
      "label": "x-intercept",
      "description": "Where the line crosses the x axis: the value of x at y = 0, −b ÷ m. None for a flat line.",
      "format": "number"
    },
    "xPoint": {
      "label": "x-intercept point",
      "description": "The point (−b ÷ m, 0) where the line crosses the x axis, as exact fractions. None for a flat line, except y = 0, which is the x axis.",
      "format": "text"
    },
    "equation": {
      "label": "Slope-intercept form",
      "description": "The line as y = mx + b, with the slope m and the y-intercept b as exact fractions.",
      "format": "text"
    },
    "slope": {
      "label": "Slope m",
      "description": "The rise over the run: (y₂ − y₁) ÷ (x₂ − x₁).",
      "format": "number"
    },
    "standard": {
      "label": "Standard form",
      "description": "The same line as Ax + By = C, with whole numbers A, B, C that share no factor.",
      "format": "text"
    },
    "y": {
      "label": "y on the line",
      "description": "The y value on the line at the x you typed: mx + b.",
      "format": "number"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "given": "points",
      "x1": 2,
      "y1": -1,
      "x2": -5,
      "y2": 3,
      "m": -3,
      "a": 12,
      "b": 2,
      "c": -1
    },
    "outputs": {
      "intercept": 0.14285714285714285,
      "yPoint": "(0, 1/7)",
      "xIntercept": 0.25,
      "xPoint": "(1/4, 0)",
      "equation": "y = −(4/7)x + 1/7",
      "slope": -0.5714285714285714,
      "standard": "4x + 7y = 1"
    },
    "text": "The line y = −(4/7)x + 1/7 crosses the y axis at (0, 1/7)."
  },
  "examples": [
    {
      "given": {
        "given": "points",
        "x1": 2,
        "y1": -1,
        "x2": -5,
        "y2": 3
      },
      "expect": {
        "intercept": 0.14285714285714285,
        "yPoint": "(0, 1/7)",
        "slope": -0.5714285714285714,
        "xIntercept": 0.25,
        "xPoint": "(1/4, 0)",
        "equation": "y = −(4/7)x + 1/7",
        "standard": "4x + 7y = 1"
      },
      "source": "hand calculation in content.mdx: m = 4 ÷ (−7) = −4/7 (OpenStax Example 8), b = −1 − (−4/7) × 2 = 1/7; OpenStax, Algebra and Trigonometry 2e, §2.2 Linear Equations in One Variable (slope formula, y = mx + b, standard form Ax + By = C; Example 10: slope −3 through (4, 8) gives y = −3x + 20; Example 12: slope −6 through (1/4, −2) gives 12x + 2y = −1), https://openstax.org/books/algebra-and-trigonometry-2e/pages/2-2-linear-equations-in-one-variable (retrieved 2026-10-02)"
    },
    {
      "given": {
        "given": "slope",
        "m": -3,
        "x1": 4,
        "y1": 8,
        "x": 1
      },
      "expect": {
        "intercept": 20,
        "equation": "y = −3x + 20",
        "xIntercept": 6.666666666666667,
        "xPoint": "(20/3, 0)",
        "y": 17
      },
      "source": "OpenStax, Algebra and Trigonometry 2e, §2.2 Linear Equations in One Variable (slope formula, y = mx + b, standard form Ax + By = C; Example 10: slope −3 through (4, 8) gives y = −3x + 20; Example 12: slope −6 through (1/4, −2) gives 12x + 2y = −1), https://openstax.org/books/algebra-and-trigonometry-2e/pages/2-2-linear-equations-in-one-variable (retrieved 2026-10-02); hand calculation in content.mdx: x-intercept 20 ÷ 3, y at 1 is 17"
    },
    {
      "given": {
        "given": "standard",
        "a": 12,
        "b": 2,
        "c": -1
      },
      "expect": {
        "intercept": -0.5,
        "yPoint": "(0, −1/2)",
        "slope": -6,
        "xIntercept": -0.08333333333333333,
        "xPoint": "(−1/12, 0)"
      },
      "source": "OpenStax, Algebra and Trigonometry 2e, §2.2 Linear Equations in One Variable (slope formula, y = mx + b, standard form Ax + By = C; Example 10: slope −3 through (4, 8) gives y = −3x + 20; Example 12: slope −6 through (1/4, −2) gives 12x + 2y = −1), https://openstax.org/books/algebra-and-trigonometry-2e/pages/2-2-linear-equations-in-one-variable (retrieved 2026-10-02); hand calculation in content.mdx: b = C ÷ B = −1/2, x-intercept C ÷ A = −1/12"
    },
    {
      "given": {
        "given": "slope",
        "m": -3,
        "x1": 0,
        "y1": -4
      },
      "expect": {
        "intercept": -4,
        "yPoint": "(0, −4)",
        "xIntercept": -1.3333333333333333,
        "xPoint": "(−4/3, 0)"
      },
      "source": "OpenStax, Algebra and Trigonometry 2e, §2.1 The Rectangular Coordinate Systems and Graphs (set x = 0 for the y-intercept and y = 0 for the x-intercept; y = −3x − 4 crosses at (0, −4) and (−4/3, 0)), https://openstax.org/books/algebra-and-trigonometry-2e/pages/2-1-the-rectangular-coordinate-systems-and-graphs (retrieved 2026-10-02)"
    },
    {
      "given": {
        "given": "points",
        "x1": -2,
        "y1": 5,
        "x2": 4,
        "y2": 5
      },
      "expect": {
        "intercept": 5,
        "slope": 0,
        "equation": "y = 5"
      },
      "source": "hand calculation in content.mdx: a flat line y = 5 crosses the y axis at 5 and never meets the x axis; OpenStax, Algebra and Trigonometry 2e, §2.1 The Rectangular Coordinate Systems and Graphs (set x = 0 for the y-intercept and y = 0 for the x-intercept; y = −3x − 4 crosses at (0, −4) and (−4/3, 0)), https://openstax.org/books/algebra-and-trigonometry-2e/pages/2-1-the-rectangular-coordinate-systems-and-graphs (retrieved 2026-10-02)"
    }
  ],
  "sources": [
    "OpenStax, Algebra and Trigonometry 2e, §2.2 Linear Equations in One Variable (slope formula, y = mx + b, standard form Ax + By = C; Example 10: slope −3 through (4, 8) gives y = −3x + 20; Example 12: slope −6 through (1/4, −2) gives 12x + 2y = −1). https://openstax.org/books/algebra-and-trigonometry-2e/pages/2-2-linear-equations-in-one-variable (retrieved 2026-10-02)",
    "OpenStax, Algebra and Trigonometry 2e, §2.1 The Rectangular Coordinate Systems and Graphs (set x = 0 for the y-intercept and y = 0 for the x-intercept; y = −3x − 4 crosses the axes at (0, −4) and (−4/3, 0)). https://openstax.org/books/algebra-and-trigonometry-2e/pages/2-1-the-rectangular-coordinate-systems-and-graphs (retrieved 2026-10-02)"
  ],
  "related": [
    "slope-intercept",
    "slope",
    "midpoint"
  ],
  "changelog": []
}
