Linear equation from slope and point
Slope 2 through the point (1, 3) gives y − 3 = 2(x − 1), which simplifies to y equals 2x + 1 because the y-intercept is 3 − 2 × 1, that is 1. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Slope
- 2
- X
- 1
- Y
- 3
- Intercept
- 1
- Point slope
- y - 3 = 2(x - 1)
- Slope intercept
- y = 2x + 1
When you already know the slope of a line and one point that lies on it, the equation of that line is fully determined. Students, tutors, and automation scripts repeatedly convert those three numbers into point-slope form and then into slope-intercept form with an explicit y-intercept. This linear equation from slope and point calculator accepts the slope m and the coordinates of a point, applies the identity b equals y minus m times x, and returns both standard display strings plus the numeric intercept. Vertical lines are outside this contract because a finite slope cannot represent them; for those cases use a two-point or standard-form tool instead.
From slope and a point to both equation forms
A non-vertical line in the plane has a unique real slope m, the constant rate of change of y with respect to x. If you also know any single point (x0, y0) on that line, the point-slope form of the equation is y minus y0 equals m times the quantity x minus x0. Expanding and rearranging immediately yields the slope-intercept form y equals m x plus b, where the y-intercept is the value of y when x is zero.
Algebraically, substitute the known point into y equals m x plus b to obtain b equals y0 minus m times x0. That single subtraction is the entire numerical core of this capability: no iterative solvers, no symbolic computer algebra, and no network. Once b is known, both display strings are pure formatting of the three numbers m, x0, y0, and b.
Negative slopes and points in any quadrant are handled with the same formula; only the signs inside the printed equations change. Because the input slope is a finite number by contract, vertical lines—which would require infinite slope—are rejected as invalid when Infinity is supplied rather than silently inventing a non-numeric equation.
What you can do with it
Classroom and homework checks
Students enter slope and a point, then verify point-slope and y=mx+b forms against textbook methods and the computed intercept.
Exam and LMS auto-grading
Score slope-and-point items with a deterministic intercept and canonical equation strings instead of hand-graded partial credit.
Design slopes and anchor points
Convert a known grade or rate of change plus one measured point into y=mx+b for notebooks, CAD notes, or calibration scripts.
FAQ
How do I get the line equation from a slope and a point?
Send finite numbers slope (m), x, and y for a point on the line.
What is the difference between point-slope and slope-intercept form?
Point-slope is y−y0=m(x−x0) using the given point. Slope-intercept is y=mx+b with b=y0−m·x0, the y-value where the line crosses the vertical axis.
Can I enter a vertical line?
No. Vertical lines have undefined (infinite) slope. This calculator requires a finite slope; use a two-point or standard-form tool for vertical lines.
What happens if a field is missing or not a number?
Non-finite values such as NaN or Infinity are rejected the same way and are not billed.
What happens when the slope is zero?
The line is horizontal. The point-slope form reduces to y minus the point's y-value equals zero, and the slope-intercept form becomes y equals the intercept, a constant value for every x.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/algebra/linear-equation-from-slope-point \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"slope":2,"x":1,"y":3}'const res = await fetch("https://api.kit.forhosting.com/algebra/linear-equation-from-slope-point", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"slope": 2,
"x": 1,
"y": 3
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/algebra/linear-equation-from-slope-point",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"slope": 2,
"x": 1,
"y": 3
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/algebra/linear-equation-from-slope-point", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"slope":2,"x":1,"y":3}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"slope":2,"x":1,"y":3}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/algebra/linear-equation-from-slope-point", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"slope": 2,
"x": 1,
"y": 3
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "algebra.linear_equation_from_slope_point",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
From slope and a point to both equation forms
Special cases stay well-defined under a finite slope: a horizontal line has m equal to zero, so point-slope collapses to y minus y0 equals zero (or simply y equals the constant intercept), and slope-intercept becomes y equals b.
Input contract, response fields, and error behaviour
Example: slope two, point one three yields intercept one, point-slope y minus three equals two open parenthesis x minus one close parenthesis, and slope-intercept y equals two x plus one, because three minus two times one equals one. Failed validation is not billed. POST a JSON body with three required finite numbers: slope (aliases m and gradient), x (aliases x0 and x1), and y (aliases y0 and y1). Each field may arrive as a JSON number or as a decimal numeric string; missing fields, empty strings, NaN, and Infinity fail with invalid_input naming the field. On success the response echoes the rounded slope and point coordinates, the numeric intercept b, a point_slope string such as y minus three equals two times open parenthesis x minus one close parenthesis, a slope_intercept string such as y equals two x plus one, and a short formula field restating the identities used. Pair this endpoint with a two-point line tool only when you need to discover the slope first; when the slope is already known, this calculator is the direct path.
Where a slope-and-point line equation API earns its keep
Algebra classrooms and tutoring platforms use a linear equation from slope and point calculator so learners can check both forms without arithmetic slips on the intercept. Keep requests small, pin the rounded intercept and equation strings in tests, and you get reproducible line equations for homework, LMS plugins, and edge workers without standing up symbolic math infrastructure of your own. Exam generators and LMS auto-graders need a deterministic oracle that marks wrong an invented intercept while accepting equivalent display styles only after normalization—this endpoint returns a single canonical string per form so graders can compare exactly or re-parse the numbers. Engineering notebooks often know a design slope (grade, ramp, or calibration line) and one measured anchor point; calling a tiny parse API avoids pulling a full computer-algebra system for three coefficients.
Technical questions
What does the linear equation from slope and point calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.