---
title: "Slope Calculator"
method: GET
path: "/api/calc/slope-calculator"
tags: ["Math"]
---

# Slope Calculator

`GET /api/calc/slope-calculator`

## Request

- Base URL: `https://calcbright.com`
- URL: `https://calcbright.com/api/calc/slope-calculator`
- Auth: none declared

Two points in, the whole line out: slope as a fraction, y = mx + b, point-slope and standard form, the angle, distance and midpoint, each with its working.

## Query parameters

- `x1` number: x₁
- `y1` number: y₁
- `x2` number: x₂
- `y2` number: y₂

## Response `200`

Calculation result

- CalcOutput
  - `ok` boolean
  - `tool` string
  - `name` string
  - `url` string: Open this link to see the full calculation
  - `inputs` object
  - `summary` string: Plain-text answer
  - `details` string
  - `result` object
  - `errors` object

## Other responses

- `400`: Invalid input (see errors)

---

[API](https://skmtc.dev/calcbright/apis/calcbright-calculator-api.md) · [All operations](https://skmtc.dev/calcbright/apis/calcbright-calculator-api/llms.txt) · [OpenAPI document](https://skmtc.dev/calcbright/apis/calcbright-calculator-api/revisions/f58229e56e58?raw)
