{
  "slug": "slope",
  "title": "Slope Calculator",
  "heading": "Slope Calculator",
  "category": "math",
  "url": "https://www.revenuelab.fyi/toolbox/slope",
  "summary": "Slope, intercept, and distance between two points.",
  "description": "Compute slope, y-intercept, and distance for two points (x₁,y₁) and (x₂,y₂).",
  "formula": "m = (y₂ − y₁) / (x₂ − x₁)",
  "dateModified": "2026-10-03",
  "run_url": "https://www.revenuelab.fyi/api/public/calc?tool=slope",
  "inputs": [
    {
      "id": "x1",
      "label": "x₁",
      "kind": "number",
      "hint": null,
      "default": 1,
      "unit": null,
      "min": null,
      "max": null
    },
    {
      "id": "y1",
      "label": "y₁",
      "kind": "number",
      "hint": null,
      "default": 2,
      "unit": null,
      "min": null,
      "max": null
    },
    {
      "id": "x2",
      "label": "x₂",
      "kind": "number",
      "hint": null,
      "default": 4,
      "unit": null,
      "min": null,
      "max": null
    },
    {
      "id": "y2",
      "label": "y₂",
      "kind": "number",
      "hint": null,
      "default": 10,
      "unit": null,
      "min": null,
      "max": null
    }
  ],
  "outputs": [
    {
      "id": "slope",
      "label": "Slope (m)",
      "format": "decimal",
      "hint": null,
      "primary": true
    },
    {
      "id": "intercept",
      "label": "Y-intercept (b)",
      "format": "decimal",
      "hint": null,
      "primary": false
    },
    {
      "id": "distance",
      "label": "Distance",
      "format": "decimal",
      "hint": null,
      "primary": false
    }
  ],
  "worked_example": {
    "inputs": [
      "x₁: 1",
      "y₁: 2",
      "x₂: 4",
      "y₂: 10"
    ],
    "outputs": [
      "Slope (m): 2.6667",
      "Y-intercept (b): -0.6667",
      "Distance: 8.544"
    ]
  },
  "how_to": {
    "title": "How to use this",
    "steps": [
      "Enter x₁.",
      "Enter y₁.",
      "Enter x₂.",
      "Enter y₂.",
      "Read your slope (m) on the right — it updates as you type.",
      "Hit Share to keep the scenario or send it to someone."
    ]
  },
  "scenarios": [
    {
      "name": "Conservative",
      "description": "Lower-end numbers — what if things land soft?",
      "values": {
        "x1": 0.6,
        "y1": 1.2,
        "x2": 2.4,
        "y2": 6
      }
    },
    {
      "name": "Typical",
      "description": "Defaults — the most common real-world setup.",
      "values": {
        "x1": 1,
        "y1": 2,
        "x2": 4,
        "y2": 10
      }
    },
    {
      "name": "Ambitious",
      "description": "Higher-end numbers — what if things really pop?",
      "values": {
        "x1": 1.6,
        "y1": 3.2,
        "x2": 6.4,
        "y2": 16
      }
    }
  ],
  "limitations": [
    "Results are rounded for display; the underlying calculation keeps full precision.",
    "Very large or very small inputs may hit floating-point limits in the browser.",
    "Inputs outside the accepted range are clamped rather than rejected."
  ],
  "faq": [
    {
      "q": "How does the slope calculator work?",
      "a": "Compute slope, y-intercept, and distance for two points (x₁,y₁) and (x₂,y₂). The underlying maths is: m = (y₂ − y₁) / (x₂ − x₁)"
    },
    {
      "q": "What do I need to enter?",
      "a": "4 values: x₁, y₁, x₂, and y₂. Each field starts with a sensible default, so you can change one number at a time and watch the result move."
    },
    {
      "q": "What does the slope (m) result mean?",
      "a": "It is returned as a decimal number and updates live as you edit the inputs, so you can compare two or three versions of a scenario in a few seconds."
    },
    {
      "q": "Is this calculator free, and do I need an account?",
      "a": "Yes, it's free, and no account is required. Nothing you type is stored on our servers — the maths runs entirely in your browser."
    },
    {
      "q": "How accurate is the result?",
      "a": "It applies the standard formula exactly, so the arithmetic is precise. Results are rounded for display; the underlying calculation keeps full precision."
    },
    {
      "q": "Who is this tool for?",
      "a": "It's built for students, developers, and anyone who needs the answer right now without setting up a spreadsheet."
    }
  ],
  "related": [
    "https://www.revenuelab.fyi/toolbox/quadratic",
    "https://www.revenuelab.fyi/toolbox/area"
  ],
  "license": "CC-BY-4.0",
  "citation": "RevenueLab — Slope Calculator (https://www.revenuelab.fyi/toolbox/slope)"
}