Line intercept form calculator
This line intercept form calculator turns two axis crossings into a complete equation of a straight line.
Run — free
Enter the nonzero x-intercept and y-intercept, and it identifies the two points on the axes, calculates the slope, writes the intercept form, rearranges it into slope-intercept form, and supplies standard form with coefficients. The calculation is deterministic and useful for checking algebra homework, preparing graphs, or converting information read from a diagram into forms that other systems can use.
Start with the two axis crossings
An x-intercept tells you where a line crosses the horizontal axis, so an x-intercept of 6 represents the point (6, 0). A y-intercept tells you where the same line crosses the vertical axis, so a y-intercept of 3 represents (0, 3). Those two distinct points determine one straight line when both intercepts are nonzero. Enter signed values when a crossing lies on a negative half-axis; for example, -4 means four units to the left or below the origin, depending on the field. The calculator accepts ordinary decimals and scientific notation as well as integers. It rejects zero because the classic intercept equation divides by each intercept. A zero value would also make the two named axis crossings ambiguous for this method: the origin belongs to both axes, and an axis-aligned line does not have two finite, nonzero intercepts of the required kind. Keeping this restriction explicit prevents a plausible-looking equation from hiding a division by zero. After validation, the result repeats both intercepts and lists their corresponding points so you can verify that the intended geometry was used before relying on any rearranged form.
Understand intercept and slope-intercept forms
If the x-intercept is a and the y-intercept is b, intercept form is x/a + y/b = 1. It is especially convenient when a graph or word problem gives axis crossings directly, because the two known numbers appear in the denominators without first solving simultaneous equations. To obtain slope-intercept form, isolate y. Multiplying and rearranging gives y = (-b/a)x + b, so the slope is -b/a and the constant term is exactly the supplied y-intercept. The calculator performs that conversion and returns both the numeric slope and a readable equation. Signs matter: if both intercepts have the same sign, the slope is negative; if their signs differ, the slope is positive. You can check the result by substituting x = 0, which must produce the original y-intercept, and then substituting y = 0, which must recover the original x-intercept. Decimal results are rounded consistently to avoid distracting floating-point tails, while the original geometric relationship remains the basis of every returned form. This makes the output suitable both for a quick visual check and for structured use in an application.
Read and verify the standard form
Clearing the denominators in x/a + y/b = 1 gives bx + ay = ab. That identity provides standard form directly, with A based on the y-intercept, B based on the x-intercept, and C equal to their product. When all three coefficients are safe integers, the calculator divides them by their common factor and normalizes the leading sign, producing a smaller equivalent equation such as x + 2y = 6 instead of 3x + 6y = 18. For decimal intercepts, coefficients are kept as stable decimals rather than expanded into potentially huge integer ratios. The response includes A, B, and C separately as well as the formatted equation, which is helpful when another calculation needs coefficients rather than display text. Verification is straightforward: insert (a, 0) and (0, b) into Ax + By = C; each point must make both sides equal. Remember that equivalent standard equations may look different because multiplying every coefficient by the same nonzero constant does not change the line. The normalized output is one convenient representative, while the intercept and slope-intercept strings let you compare the same geometry from two other algebraic perspectives.
What you can do with it
Convert a graph into an equation
Read the two axis crossings from a plotted line and obtain three common equation forms without solving a separate system.
Check algebra exercises
Compare your slope, signs, and reduced standard coefficients with a deterministic result derived from the intercept formula.
Prepare coefficients for another calculation
Use the structured A, B, and C values in graphing, intersection, or distance workflows while retaining readable equations.
FAQ
What is the intercept form of a line?
For nonzero x-intercept a and y-intercept b, it is x/a + y/b = 1.
How is the slope calculated?
The line passes through (a, 0) and (0, b), so its slope is (b - 0)/(0 - a), which simplifies to -b/a.
Why can neither intercept be zero?
Intercept form uses each intercept as a denominator. Zero would make that expression undefined and does not describe the required pair of finite, nonzero axis crossings.
Can I enter negative or decimal intercepts?
Yes. Any finite, nonzero integer, decimal, or scientific-notation value is accepted.
Why might my standard form differ from another correct answer?
Multiplying all coefficients by the same nonzero constant gives an equivalent equation. This calculator reduces safe integer coefficients and normalizes the leading sign.
What does the API request cost?
Each API request costs $0.002. The calculation uses no network service or random process.
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/line-from-intercepts \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"x_intercept":6,"y_intercept":3}'const res = await fetch("https://api.kit.forhosting.com/algebra/line-from-intercepts", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"x_intercept": 6,
"y_intercept": 3
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/algebra/line-from-intercepts",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"x_intercept": 6,
"y_intercept": 3
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/algebra/line-from-intercepts", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"x_intercept":6,"y_intercept":3}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"x_intercept":6,"y_intercept":3}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/algebra/line-from-intercepts", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"x_intercept": 6,
"y_intercept": 3
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "algebra.line_from_intercepts",
"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. |