{
  "id": "point-slope-form",
  "version": "79a42702a5be",
  "status": "published",
  "name": "Point Slope Form Calculator",
  "question": "What is my line in point-slope form?",
  "summary": "Finds the point-slope form y − y₁ = m(x − x₁) of a line through two points, or through one point with a given slope, in exact fractions, with the slope-intercept and standard forms.",
  "category": "math",
  "subcategory": "algebra",
  "url": "https://www.acalculator.org/math/point-slope-form-calculator",
  "markdown": "https://www.acalculator.org/math/point-slope-form-calculator.md",
  "kind": "function",
  "method": "m = (y₂ − y₁) ÷ (x₂ − x₁) (or the slope as typed), b = y₁ − m × x₁, and the line is y = mx + b; all in exact fractions.",
  "assumptions": [
    "Every number is read exactly as typed: 0.1 is 1/10, so the slope and intercept are exact fractions.",
    "The two points must have different x values. A vertical line, x = c, has no slope-intercept form.",
    "The point-slope form uses the first point, (x₁, y₁).",
    "The standard form Ax + By = C uses whole numbers with no common factor, with A ≥ 0.",
    "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, or its slope and one point.",
        "type": "string",
        "enum": [
          "points",
          "slope"
        ]
      },
      "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"
      },
      "x": {
        "title": "x",
        "description": "Optional: an x value at which to read y on the line.",
        "type": "number"
      }
    }
  },
  "outputs": {
    "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"
    },
    "intercept": {
      "label": "y-intercept b",
      "description": "Where the line crosses the y axis: the value of y at x = 0.",
      "format": "number"
    },
    "xIntercept": {
      "label": "x-intercept",
      "description": "Where the line crosses the x axis: the value of x at y = 0, which is −b ÷ m. None for a flat line.",
      "format": "number"
    },
    "pointSlope": {
      "label": "Point-slope form",
      "description": "The line as y − y₁ = m(x − x₁), through the first point, with the slope as an exact fraction.",
      "format": "text"
    },
    "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": 1,
      "y1": 3,
      "x2": 3,
      "y2": 7,
      "m": 2
    },
    "outputs": {
      "equation": "y = 2x + 1",
      "slope": 2,
      "intercept": 1,
      "xIntercept": -0.5,
      "pointSlope": "y − 3 = 2(x − 1)",
      "standard": "2x − y = −1"
    },
    "text": "In point-slope form the line is y − 3 = 2(x − 1), which is y = 2x + 1."
  },
  "examples": [
    {
      "given": {
        "given": "points",
        "x1": -2,
        "y1": -4,
        "x2": 0,
        "y2": 2
      },
      "expect": {
        "pointSlope": "y + 4 = 3(x + 2)",
        "equation": "y = 3x + 2",
        "slope": 3,
        "intercept": 2
      },
      "source": "OpenStax, Algebra and Trigonometry 2e, §4.1 Linear Functions (point-slope form y − y₁ = m(x − x₁)). https://openstax.org/books/algebra-and-trigonometry-2e/pages/4-1-linear-functions, retrieved 2026-10-02, Example 5: through (0, 2) and (−2, −4), y + 4 = 3(x + 2), so y = 3x + 2"
    },
    {
      "given": {
        "given": "points",
        "x1": 3,
        "y1": -2,
        "x2": 8,
        "y2": 1
      },
      "expect": {
        "pointSlope": "y + 2 = (3/5)(x − 3)",
        "equation": "y = (3/5)x − 19/5",
        "slope": 0.6,
        "intercept": -3.8
      },
      "source": "OpenStax, Algebra and Trigonometry 2e, §4.1 Linear Functions (point-slope form y − y₁ = m(x − x₁)). https://openstax.org/books/algebra-and-trigonometry-2e/pages/4-1-linear-functions, retrieved 2026-10-02, Example 7: f(3) = −2 and f(8) = 1 give y + 2 = (3/5)(x − 3), so y = (3/5)x − 19/5"
    },
    {
      "given": {
        "given": "slope",
        "m": -0.5,
        "x1": 4,
        "y1": 1,
        "x": 10
      },
      "expect": {
        "pointSlope": "y − 1 = −(1/2)(x − 4)",
        "equation": "y = −(1/2)x + 3",
        "standard": "x + 2y = 6",
        "y": -2
      },
      "source": "hand calculation in content.mdx: slope −1/2 through (4, 1); b = 1 − (−1/2) × 4 = 3; at x = 10, y = −2; OpenStax, Algebra and Trigonometry 2e, §4.1 Linear Functions (point-slope form y − y₁ = m(x − x₁)). https://openstax.org/books/algebra-and-trigonometry-2e/pages/4-1-linear-functions, retrieved 2026-10-02"
    },
    {
      "given": {
        "given": "points",
        "x1": 0,
        "y1": 5,
        "x2": 4,
        "y2": 5
      },
      "expect": {
        "pointSlope": "y − 5 = 0",
        "equation": "y = 5",
        "slope": 0
      },
      "source": "hand calculation in content.mdx: equal y values give slope 0, so y − 5 = 0(x − 0), written y − 5 = 0; OpenStax, Algebra and Trigonometry 2e, §4.1 Linear Functions (point-slope form y − y₁ = m(x − x₁)). https://openstax.org/books/algebra-and-trigonometry-2e/pages/4-1-linear-functions, retrieved 2026-10-02"
    },
    {
      "given": {
        "given": "points",
        "x1": 0.1,
        "y1": 0.2,
        "x2": 0.3,
        "y2": 0.5
      },
      "expect": {
        "pointSlope": "y − 1/5 = (3/2)(x − 1/10)",
        "slope": 1.5,
        "intercept": 0.05
      },
      "source": "hand calculation in content.mdx: decimals are exact, m = 0.3 ÷ 0.2 = 3/2, through (1/10, 1/5); OpenStax, Algebra and Trigonometry 2e, §4.1 Linear Functions (point-slope form y − y₁ = m(x − x₁)). https://openstax.org/books/algebra-and-trigonometry-2e/pages/4-1-linear-functions, retrieved 2026-10-02"
    }
  ],
  "sources": [
    "OpenStax, Algebra and Trigonometry 2e, §4.1 Linear Functions (point-slope form y − y₁ = m(x − x₁); Example 5: through (0, 2) and (−2, −4) the line is y + 4 = 3(x + 2), or y = 3x + 2; Example 7: f(3) = −2 and f(8) = 1 give y + 2 = (3/5)(x − 3), or y = (3/5)x − 19/5). https://openstax.org/books/algebra-and-trigonometry-2e/pages/4-1-linear-functions (retrieved 2026-10-02)"
  ],
  "related": [
    "slope-intercept",
    "slope",
    "midpoint",
    "x-intercept"
  ],
  "changelog": []
}
