Polynomial graphing calculator
Enter the coefficients and an x-range and get evenly spaced points ready to draw: x² from −2 to 2 with five points gives (−2, 4), (−1, 1), (0, 0), (1, 1) and (2, 4). Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Coefficients
- 1, 0, 0
- X start
- -2
- X end
- 2
- Samples
- 5
- Degree
- 2
- Polynomial
- x^2
- Step
- 1
- Point count
- 5
Graphing a polynomial means turning its coefficient list into a dense enough set of x-y samples that a chart, worksheet, or canvas can draw the curve without a computer-algebra kernel. Students, tutors, and automation scripts all hit the same task: evaluate p(x) on a closed interval and emit ordered points. This polynomial graphing calculator accepts highest-degree-first coefficients together with an x-range, samples the polynomial at equally spaced abscissae by Horner's method, and returns the list of x-y points plus a compact standard-form string.
Where plotting a polynomial pays off
Classrooms and tutoring platforms use a polynomial graphing calculator so learners can paste coefficients for a quadratic, cubic, or higher polynomial, pick a viewing window, and see the sampled curve without flipping a sign while building a table by hand. Exam-prep generators and LMS plugins need a deterministic oracle that marks a reversed interval as invalid instead of silently drawing the graph backwards or returning an empty success list that a buggy grader might treat as a correct plot. Failed validation does not consume balance.
Keep the sample count modest for sketches, raise it when the curve has sharp curvature, pin the rounded points in tests, and you get reproducible plot data for homework, LMS figures, and edge workers without standing up symbolic math infrastructure of your own.
What you can do with it
Classroom tables and sketches
Let students enter coefficients and a viewing window, then plot the returned x-y points beside the table they computed by hand.
Exam and LMS figure generation
Build deterministic polynomial graphs for worksheets and auto-graders that reject a reversed x-range instead of drawing it backwards.
Notebooks and dashboard polylines
Turn a fitted or textbook polynomial into a compact point list for charts without importing a full computer-algebra or plotting library.
FAQ
In what order should I send coefficients?
Example: x^2 − 1 is [1, 0, −1].
How many points should I ask for?
Anything from 2 to 1001, counting both ends of the range; the default is 11. A few points are enough for a quick sketch, but use more where the curve bends sharply so the straight segments between points do not hide its shape.
What happens if the range starts after it ends?
The calculation is refused rather than drawing the graph backwards or handing back an empty plot. The start of the range has to be strictly smaller than its end, so swap the two values and try again.
Does it find the roots or draw the picture?
No. It gives you the list of sampled points, which any chart or spreadsheet can join into a curve. Finding roots, sketching asymptotes or producing an image are separate jobs that this tool leaves out.
What points does x² give between −2 and 2?
With five points the step is 1, and you get (−2, 4), (−1, 1), (0, 0), (1, 1) and (2, 4): the familiar U-shaped parabola, with its lowest point at (0, 0).
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/math/polynomial-graphing \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"coefficients":[1,0,0],"x_start":-2,"x_end":2}'const res = await fetch("https://api.kit.forhosting.com/math/polynomial-graphing", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"coefficients": [
1,
0,
0
],
"x_start": -2,
"x_end": 2
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/math/polynomial-graphing",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"coefficients": [
1,
0,
0
],
"x_start": -2,
"x_end": 2
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/math/polynomial-graphing", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"coefficients":[1,0,0],"x_start":-2,"x_end":2}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"coefficients":[1,0,0],"x_start":-2,"x_end":2}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/math/polynomial-graphing", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"coefficients": [
1,
0,
0
],
"x_start": -2,
"x_end": 2
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "math.polynomial_graphing",
"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.
Limits
max_degree | 64 |
max_samples | 1001 |
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
If the range start is not strictly less than the range end, the task fails with invalid_input instead of inventing a reversed or empty plot.
What a sampled polynomial graph is and how Horner evaluation works
A quadratic such as coefficients [1, 0, 0] on [−2, 2] with five samples yields the familiar parabola points (−2, 4), (−1, 1), (0, 0), (1, 1), (2, 4). Constants produce a horizontal line; a linear binomial produces a straight segment. Degree is reported from the first non-zero leading coefficient; the zero polynomial is treated as degree zero and graphs as the x-axis. Nothing here finds roots, sketches asymptotes of rationals, or emits an image: the contract is the numeric point list a graphing client already knows how to draw. A univariate polynomial is a finite sum p(x) equals a_n x to the n plus a_{n-1} x to the n minus one, down to the constant a_0. Graphing that function on a closed interval is not the same job as finding its roots, dividing it, or integrating it: a plot needs a list of sampled points (x_i, p(x_i)) that a renderer can connect. This calculator builds that list by walking a uniform grid from x_start to x_end inclusive and evaluating p at each abscissa with Horner's method. Horner rewrites the polynomial as a nested multiply-add, p(x) equals ((a_n x + a_{n-1}) x + … ) x + a_0, so each sample costs one multiply and one add per coefficient and stays numerically stabler than summing independent powers of x. The grid has samples points (default eleven), so the step is (x_end minus x_start) divided by (samples minus one). Both endpoints are included: the first point is always (x_start, p(x_start)) and the last point is pinned to x_end so accumulated floating-point drift cannot miss the right edge of the window you asked for.
Input contract, range check, response shape, and errors
Missing fields, empty coefficient arrays, non-finite entries, and a degree above sixty-four fail the same way, naming the field. Values are rounded to twelve decimal places so goldens compare byte-for-byte across runtimes. POST a JSON body with required coefficients, required x_start, and required x_end. Coefficients is a non-empty array of finite numbers in highest-degree-first order: [a_n, a_{n-1}, …, a_0] for p(x) equals a_n x^n plus … plus a_0. The aliases coeffs and poly are accepted. x_start (aliases start, x_min) is the left endpoint of the closed window; x_end (aliases end, x_max) is the right endpoint. Both must be finite numbers, and x_start must be strictly less than x_end. Optional samples (aliases n, count) is an integer from two to one thousand and one inclusive; omit it and the default of eleven points is used. On success the body echoes the cleaned coefficients, reports degree and a compact polynomial display string, repeats x_start, x_end, samples, and the uniform step, and returns points as an ordered array of objects each with x and y, plus point_count. Pair the list with your own charting library; this endpoint does not rasterize a picture or invent SVG.
Where a polynomial graphing API earns its keep
Engineering and science notebooks often need a quick polyline of a fitted polynomial, a characteristic polynomial, or a low-order Taylor piece before they hand the same coefficients to a root finder or a Riemann-sum tool; calling a tiny parse API avoids pulling a full plotting stack for a coefficient vector and two numbers.
Technical questions
How do I graph a polynomial from its coefficients?
Send coefficients highest degree first, plus x_start and x_end with x_start < x_end. The API returns equally spaced (x, y) points of p(x) on that closed interval.
What happens if the range start is not less than the range end?
The task fails with invalid_input. A graphing window needs x_start strictly less than x_end; equal or reversed ranges are not billed.
How are the sample points spaced?
Uniformly. With N samples the step is (x_end − x_start) / (N − 1). Both endpoints are included; the last x is pinned to x_end.
What does the polynomial graphing calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.