Line standard form converter
Slope 2 and intercept 3 become 2x − y = −3 in standard form, ready for a rubric or a distance formula. Enter the slope and y-intercept of any non-vertical line and get A, B and C already tidied up. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Slope
- 2
- Intercept
- 3
- Slope intercept
- y = 2x + 3
- A
- 2
- B
- -1
- C
- -3
Standard form Ax + By = C is the classroom and exam presentation of a line when textbooks ask for integer coefficients, comparison of two lines, or a quick plug-in to the distance formula. Slope-intercept form y = mx + b is often how a line is discovered—from a graph, a regression, or two known points—but many grading rubrics and algebra systems still want the standard Ax + By = C shape. This line standard form converter accepts the slope m and the y-intercept b, rearranges the identity y = mx + b into mx − y = −b, normalizes the signs so the x-coefficient is non-negative, reduces integer triples by their greatest common divisor, and returns both the coefficient triple and a printable equation string.
From y = mx + b to Ax + By = C
Start with the slope-intercept equation y equals m x plus b. When the slope is zero the line is horizontal: the conversion yields zero times x plus one times y equals b after sign normalization, which is the familiar y equals b written as a linear equation in two variables. When the intercept is zero the line passes through the origin and the constant C becomes zero, so the standard form reads like two x minus y equals zero for a slope of two.
Vertical lines cannot be written as y equals m x plus b for a finite m, so this converter never invents an infinite slope; callers that need a vertical line should supply standard form directly or use a two-point tool instead. The converter always prefers A greater than or equal to zero: if the raw rearrangement produces a negative A, every coefficient is multiplied by negative one so the x term leads with a non-negative coefficient, matching common textbook conventions that avoid leading negatives.
When A is already zero, the same rule flips the equation so B is positive.
Where a line standard form converter earns its keep
Algebra classrooms and tutoring platforms use a line standard form converter so learners can check that their rearrangement of y equals m x plus b matches the rubric’s preferred Ax + By equals C presentation, including the sign convention on A. Exam generators and LMS auto-graders need a deterministic oracle that rejects non-numeric junk instead of returning a partial equation that a buggy client might treat as success.
Engineering notebooks often obtain slope and intercept from regression or from two measured points and then need standard form for distance-to-line formulas, parallel and perpendicular checks, or export into systems that only accept Ax + By equals C. Keep requests small, pin the rounded coefficients in tests, and you get reproducible standard forms for homework, plugins, and edge workers without standing up a computer-algebra system for a two-parameter conversion.
What you can do with it
Classroom and homework checks
Let students enter slope m and intercept b and verify the normalized Ax+By=C form against textbook sign and GCD conventions.
Exam and LMS auto-grading
Mark slope-intercept-to-standard items with a deterministic oracle that rejects non-numeric coefficients and never invents vertical lines.
Notebooks and geometry pipelines
Convert regression or measured slope-intercept lines into Ax+By=C for distance formulas and downstream geometry APIs.
FAQ
How do I convert y = mx + b to standard form Ax + By = C?
Send finite numbers slope (m) and intercept (b).
What happens if slope or intercept is not a number?
Missing, empty, non-numeric, NaN, and Infinity values are rejected and are not billed.
Can this converter handle vertical lines?
No. Vertical lines have undefined slope and cannot be written as y = mx + b with a finite m. Use a two-point or standard-form input tool for vertical lines.
How are coefficients normalized?
A is made non-negative (if A is zero, B is made positive). When A, B, and C are all integers, they are divided by their greatest common divisor so the triple is reduced.
What does a horizontal line look like in standard form?
With a slope of zero, the conversion gives 0x + 1y = b after the signs are tidied, which is the familiar horizontal line at height b written as an equation in two variables.
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/geom/line-standard-form \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"slope":2,"intercept":3}'const res = await fetch("https://api.kit.forhosting.com/geom/line-standard-form", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"slope": 2,
"intercept": 3
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/geom/line-standard-form",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"slope": 2,
"intercept": 3
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/geom/line-standard-form", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"slope":2,"intercept":3}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"slope":2,"intercept":3}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/geom/line-standard-form", 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,
"intercept": 3
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "geom.line_standard_form",
"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
Non-numeric or non-finite inputs fail with invalid_input so homework checkers and automation never receive silent garbage.
From y = mx + b to Ax + By = C
Subtract y from both sides and move the intercept: m x minus y equals negative b. That identity is already in standard form Ax + By = C with A equal to m, B equal to negative one, and C equal to negative b. The result is a unique representative for each non-vertical line given by slope and intercept, which keeps API responses stable for goldens, caches, and equality checks in graders.
Input contract, coefficient reduction, and response shape
When A, B, and C are all integers within a tiny floating-point tolerance, they are rounded to integers and divided by their greatest common divisor so that, for example, slope two and intercept four become 2x − y = −4 rather than an unreduced multiple, and a slope of one half with intercept one becomes the reduced form after clearing denominators only when the floating values land on integers after the basic rearrangement—callers who need exact rational arithmetic over fractions should scale inputs themselves before calling. POST a JSON object with two required finite numbers: slope (aliases m, gradient) and intercept (aliases b, y_intercept, intercept_y). Each field may arrive as a JSON number or as a numeric string with an optional sign, decimal point, or scientific exponent. Missing fields, empty strings, booleans, objects, NaN, and Infinity all fail with invalid_input naming the field and do not consume prepaid balance. On success the body echoes the rounded slope and intercept, a slope_intercept display string such as y = 2x + 3, the standard coefficients A, B, and C, a standard_form string such as 2x − y = −3, and a short formula reminder of the rearrangement. Pair the response with your own graphing layer if you need a sketch; this endpoint returns coefficients and strings only, without plots or multi-step prose beyond the formula field.
Technical questions
What does the line standard form converter cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.