Function zeros calculator
Enter up to four coefficients and get the points where the graph meets the x-axis: x² − 5x + 6 has the real zeros 2 and 3. Lines, parabolas and cubics all fit the same form. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- A
- 0
- B
- 1
- C
- -5
- D
- 6
- Degree
- 2
- Expression
- x^2 - 5x + 6
- Zeros
- 2, 3
- Zero count
- 2
A zero of a function is a real number x where the graph meets the x-axis, that is, a solution of the equation f of x equals zero. Algebra courses, placement exams, and calculus warm-ups all ask students to find those intercepts for linear, quadratic, and simple cubic models. This function zeros calculator accepts the four coefficients of a basic algebraic function f(x) = a x cubed plus b x squared plus c x plus d, solves f(x) = 0 in closed form, and returns every distinct real zero—or reports clearly that none exist when the graph never crosses the axis. Leading zeros simply lower the degree, so the same form covers lines, parabolas, and cubics without a separate tool for each family.
What a zero of a function is and how the four coefficients set the degree
In classroom language a zero of f is any real input that makes the output vanish. Graphically those values are the x-intercepts; algebraically they are the real roots of the equation f of x equals zero. You always send the four finite numbers a, b, c, and d.
The engine then reads the degree from the first non-zero coefficient: if a is non-zero the model is cubic; if a is zero and b is not, it is quadratic; if only the linear coefficient c survives, it is a line; if a, b, and c all vanish and d does not, f is a non-zero constant and the graph is a horizontal line that never meets the x-axis.
Complex non-real roots are omitted on purpose: a worksheet that says “find the zeros of the function” almost always wants the real intercepts, and an empty list plus a plain message is the right answer when a parabola sits entirely above or below the axis. Multiplicity is reported beside each distinct zero so a double root such as (x minus one) squared appears once with multiplicity two rather than as a confusing duplicate.
How the solver finds every real zero, or proves that none exist
The algorithm is closed form and fully deterministic. A linear function c x plus d with c not zero has exactly one zero at x equals negative d over c. A quadratic b x squared plus c x plus d is classified by the discriminant D equals c squared minus four b d: two distinct real zeros when D is positive, one repeated real zero when D is zero, and no real zeros when D is negative.
The two-root case uses a numerically stable pairing so a large linear coefficient does not cancel one intercept. A genuine cubic is depressed by the shift x equals t minus b over three a, which produces t cubed plus p t plus q equals zero. The cubic discriminant then chooses the branch: Cardano’s real cube-root formula when there is a single real root, a repeated-root identity when the discriminant vanishes, and the trigonometric form with three real cosines when the discriminant is negative.
Each candidate is shifted back, rounded to twelve significant digits for stable goldens, snapped when it is already a near-integer, and kept only if it actually makes f vanish.
What you can do with it
Homework and tutoring checks
Students and graders confirm every real zero of a line, parabola, or cubic, including a clear “none exist” result when a quadratic stays above the x-axis.
Exam and LMS auto-grading
Mark “find the zeros of the function” items with a deterministic oracle that lists intercepts and multiplicities instead of inventing complex roots.
Curriculum generators and notebooks
Problem banks and light numeric scripts ask for x-intercepts of low-degree models without pulling a full computer-algebra library.
FAQ
How do I find the zeros of a function with this calculator?
Send the four coefficients of f(x) = ax³ + bx² + cx + d.
Does it return complex zeros?
No. Only real zeros are returned. Non-real complex conjugate pairs are omitted so the output matches x-intercepts and typical classroom wording.
What if the graph never crosses the x-axis?
The result says plainly that there are no real zeros. A non-zero constant, for example, is a horizontal line that never meets the axis.
Can I use it for a line or a parabola?
Yes. Set the leading coefficients to zero and the degree drops on its own. With a first coefficient of 0, x² − 5x + 6 is treated as a parabola with zeros 2 and 3.
What does the multiplicity of a zero mean?
It tells you how many times a zero repeats as a root. Each distinct real zero is listed once with its multiplicity; for x² − 5x + 6 both zeros have multiplicity 1.
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/function-zeros \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"a":0,"b":1,"c":-5,"d":6}'const res = await fetch("https://api.kit.forhosting.com/algebra/function-zeros", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"a": 0,
"b": 1,
"c": -5,
"d": 6
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/algebra/function-zeros",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"a": 0,
"b": 1,
"c": -5,
"d": 6
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/algebra/function-zeros", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"a":0,"b":1,"c":-5,"d":6}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"a":0,"b":1,"c":-5,"d":6}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/algebra/function-zeros", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"a": 0,
"b": 1,
"c": -5,
"d": 6
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "algebra.function_zeros",
"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
Failed validation is not billed; successful calls use the published $0.002 base price.
What a zero of a function is and how the four coefficients set the degree
This endpoint studies a basic algebraic function written in the dense cubic shape f(x) = a x cubed plus b x squared plus c x plus d. The identically zero function—every coefficient equal to zero—is rejected with invalid_input, because every real number would be a zero and no finite list can report that honestly. Coefficients may arrive as JSON numbers or as numeric strings; empty fields and non-finite values fail by naming the field so a form can highlight the broken control.
How the solver finds every real zero, or proves that none exist
The response lists distinct zeros in ascending order, a parallel multiplicities array from the derivative test, the detected degree, a pretty expression string, a boolean has_real_zeros, and a short human message. When the list is empty the call is still a success: “the function has no real zeros” is a mathematical result, not invalid input. Only malformed numbers, missing required fields, or the zero function raise invalid_input, and those failures are not charged.
Calling the API, reading the response, pricing, and where this landing earns its keep
Use the free in-browser tool for one-off homework checks, lecture demos, and quick sanity tests without installing a computer-algebra system. Searchers who type “function zeros calculator” or “find the zeros of the function” want this intercept-first language, not a general polynomial-root pipeline with an arbitrary coefficient vector. Degree is capped at three by the four-coefficient form; that is the basic algebraic range of Algebra I and Algebra II. Source inputs follow the same retention rules as other KIT parse items. POST a JSON body with the four required finite numbers a, b, c, and d. Aliases a3, a2, a1, a0 and cubic, quadratic, linear, constant are accepted for the same slots. On success the body echoes the cleaned coefficients, the detected degree, the expression, the sorted real zeros, zero_count, has_real_zeros, multiplicities, a one-line message, and a formula field restating that the engine solved f of x equals zero. Validation failures never consume balance after the engine rejects the request, so you can probe missing fields and the zero-function case without spending prepaid items.
Technical questions
What if the function has no real zeros?
The call still succeeds. zeros is an empty array, has_real_zeros is false, and message says the function has no real zeros. That is the correct mathematical answer, not an error.
Why are a = b = c = d = 0 rejected?
That is the zero function: f(x)=0 for every real x, so every number is a zero. The engine refuses an infinite solution set with invalid_input instead of inventing a finite list.
What does the function zeros calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful item; invalid input is not billed.