Piecewise Function Calculator
Piecewise Function Calculator works out Function plotted and Value at the query point from Function, Second function (optional) and Variable. The default figures on this page give function plotted of x^2 for x < 0; 2 * x + 1 for x >= 0; change any entry and the result, the working and the sources update together.
Your figures
Updates as you typeHow this is worked out
4 steps
- f(x) = x^2 for x < 0; 2 * x + 1 for x >= 0
- Sampled 41 points on [-5, 5] at x_i = -5 + 10 * i / 40.
- Sampled range: 0.0625 to 25 over 41 of 41 points.
- No sign change or exact zero was found on the sampled grid.
Sampled pointstable
| x | y |
|---|---|
| -5 | 25 |
| -4.75 | 22.5625 |
| -4.5 | 20.25 |
| -4.25 | 18.0625 |
| -4 | 16 |
| -3.75 | 14.0625 |
| -3.5 | 12.25 |
| -3.25 | 10.5625 |
| -3 | 9 |
| -2.75 | 7.5625 |
| -2.5 | 6.25 |
| -2.25 | 5.0625 |
| -2 | 4 |
| -1.75 | 3.0625 |
| -1.5 | 2.25 |
| -1.25 | 1.5625 |
| -1 | 1 |
| -0.75 | 0.5625 |
| -0.5 | 0.25 |
| -0.25 | 0.0625 |
| 0 | 1 |
| 0.25 | 1.5 |
| 0.5 | 2 |
| 0.75 | 2.5 |
| 1 | 3 |
| 1.25 | 3.5 |
| 1.5 | 4 |
| 1.75 | 4.5 |
| 2 | 5 |
| 2.25 | 5.5 |
| 2.5 | 6 |
| 2.75 | 6.5 |
| 3 | 7 |
| 3.25 | 7.5 |
| 3.5 | 8 |
| 3.75 | 8.5 |
| 4 | 9 |
| 4.25 | 9.5 |
| 4.5 | 10 |
| 4.75 | 10.5 |
| 5 | 11 |
Its 6 worked examples are re-run on every release, last on 15 September 2026. What changed
Sources and references
4 sources
What the Piecewise Function Calculator calculates
Plots y = f(x), a piecewise function or a z = f(x, y) surface over a chosen domain, returning the sampled points, the range, the intercepts, the zeros and any intersection with a second curve.
How to use this Piecewise Function Calculator
Enter Function, Second function (optional), Variable and x from. Function plotted updates as you type. Change one figure at a time to see what drives the result.
How the result is worked out
Open “How this is worked out” beside the result for the step-by-step calculation behind Function plotted, Value at the query point and Smallest sampled value.
The method follows OpenStax College Algebra 2e, section 3.2 Domain and Range, OpenStax College Algebra 2e, section 3.4 Composition of Functions / piecewise definitions, Burden & Faires, Numerical Analysis, section 2.1 (the Bisection Method) and W3C Scalable Vector Graphics (SVG) 1.1, section 8.3 Path data.
What you can compare
Change one input at a time to see how it affects Function plotted, Value at the query point and Smallest sampled value. The inputs you can vary are Function, Second function (optional), Variable, x from, x to and Sample points.
Results are general information, not financial, tax, legal, medical or engineering advice. Check any decision that matters with a qualified professional.
See something wrong? Report a problem with this calculator
Frequently asked questions
How to get piecewise function on calculator?
Plots y = f(x), a piecewise function or a z = f(x, y) surface over a chosen domain, returning the sampled points, the range, the intercepts, the zeros and any intersection with a second curve. Open “How this is worked out” beside the result to see each step for your own figures.
Can you do piecewise functions on TI-84?
Plots y = f(x), a piecewise function or a z = f(x, y) surface over a chosen domain, returning the sampled points, the range, the intercepts, the zeros and any intersection with a second curve. On the figures this page opens with — x from -2, x to 2 and evaluate at x -1 — the function plotted is x² for x < 0; 2 * x + 1 for x >= 0. Put your own figures in their place and the working updates beside the result.
How to calculate a piecewise function?
It needs Function, Second function (optional), Variable, x from, x to and Sample points. Nothing else is required, and the figures stay in your browser.
How to graph a piecewise function calculator?
The result gives Function plotted, Value at the query point, Smallest sampled value, Largest sampled value, y-intercept and Zeros in the interval, each labelled with its unit so the figure can be read on its own.
What information do I need for the Piecewise Function Calculator?
You need Function, Second function (optional), Variable, x from, x to, Sample points, Piecewise breakpoints and Evaluate at x. The page opens with default figures that give function plotted of x^2 for x < 0; 2 * x + 1 for x >= 0, so you can see the scale before entering your own.
What does this Piecewise Function Calculator show?
It shows Function plotted, Value at the query point, Smallest sampled value, Largest sampled value, y-intercept, Zeros in the interval, Intersections with the second curve and Sampled points, with the working and any warnings for your entries.
