Range Of Piecewise Function Calculator
Define up to 3 linear pieces f(x) = m·x + c on intervals [a, b]. The calculator shows each piece’s range and the overall union range.
The range of a function is the set of all outputs it can produce — every y-value the function actually reaches. For a single simple function this is usually quick to find, but a piecewise function is built from several different rules on different intervals, and the range of the whole function is the union of the ranges of its pieces. Missing one piece, or misreading which endpoints are included, gives a wrong answer. The Range Of Piecewise Function Calculator on this page handles the bookkeeping: you enter up to three linear pieces, each as f(x) = m·x + c on an interval, and it computes the range of every piece and the overall union range, showing the endpoint analysis step by step.
What the Range Of Piecewise Function Calculator Does
This calculator accepts up to three pieces. For each piece you provide the slope m, the intercept c, the interval start a, the interval end b, and the endpoint style — whether each end of the interval is included or excluded (a ≤ x < b, a < x ≤ b, a ≤ x ≤ b, or a < x < b). Because a linear function on an interval always attains its extreme values at the endpoints, the calculator evaluates f(a) and f(b), determines which end is the minimum and which is the maximum from the sign of the slope, carries the included-or-excluded status through to the output values, and reports each piece's range in interval notation. It then combines all active pieces into the overall range: the smallest low to the largest high, with bracket types reflecting whether any piece actually attains each extreme.
How to Use the Range Of Piecewise Function Calculator
Each piece has a checkbox to include or exclude it, so you can work with one, two, or three pieces. Fill in the slope m and intercept c that define the linear rule, then the interval bounds a and b (a must be smaller than b), and choose the endpoint style from the dropdown — pay attention to whether your problem uses open or closed ends, because this changes the brackets in the answer. Press Calculate to see the overall range in large type, followed by a per-piece analysis showing f(a), f(b), the reasoning, and each piece’s range. Press Reset to clear everything and start a new problem.
The Formula Behind the Calculation
For a piece f(x) = m·x + c defined on an interval from a to b, the two endpoint values are f(a) = m·a + c and f(b) = m·b + c. If the slope m is positive, the function increases, so the range runs from f(a) up to f(b); the inclusion of each end matches the inclusion of the corresponding input end. If m is negative, the function decreases, so the range runs from f(b) up to f(a), and the endpoint inclusion swaps sides. If m is zero, the piece is constant and its range is the single value {f(a)}. The overall range of the piecewise function is the union of the piece ranges: its low end is the smallest piece low, its high end is the largest piece high, and each bracket is square if some piece attains that extreme value and round if no piece does.
Worked Example: Two Pieces, Step by Step
Consider the piecewise function with piece 1: f(x) = 2x + 1 on [0, 3), and piece 2: f(x) = −x + 8 on [3, 5]. This is exactly the default example loaded in the calculator.
Piece 1 analysis: the slope m = 2 is positive, so values grow from f(a) to f(b). Compute f(0) = 2 × 0 + 1 = 1 and f(3) = 2 × 3 + 1 = 7. The interval is a ≤ x < b, so x = 0 is included and x = 3 is excluded; the output 1 is attained and 7 is not. Range of piece 1: [1, 7). Piece 2 analysis: the slope m = −1 is negative, so values fall from f(a) to f(b). Compute f(3) = −1 × 3 + 8 = 5 and f(5) = −1 × 5 + 8 = 3. The interval is closed (a ≤ x ≤ b), so both 5 and 3 are attained, and the range runs from the smaller to the larger: [3, 5]. The calculator shows exactly these steps. Overall range: the smallest low is 1 (attained, square bracket) and the largest high is 7 (not attained, round bracket), giving the overall range [1, 7). Notice that piece 2's range [3, 5] sits entirely inside [1, 7), so the union does not extend it.
How to Read Your Results
The headline is the overall range in interval notation — for the example above, [1, 7) means every output from 1 up to but not including 7 is produced by some piece, and nothing outside that span is. Below it, each active piece gets its own analysis card: the slope classification (positive, negative, or constant), the computed f(a) and f(b) values with the arithmetic shown, and the piece’s range with correct brackets. Read the per-piece cards when you need to show your working for homework, and read the headline when you only need the final answer. Square brackets [ ] mean the endpoint value is included; round brackets ( ) mean it is approached but never reached; braces { } appear for constant pieces whose range is a single number.
Common Mistakes to Avoid
The classic mistake is forgetting that the slope’s sign flips which endpoint is the minimum: for a decreasing piece, the range starts at f(b), not f(a). Another is carrying the wrong bracket type across — if the interval excludes x = b, the output f(b) is excluded too, even though you computed it. Students also forget to take the union correctly: the overall range is not the sum of the pieces, and a piece whose range lies inside another’s adds nothing to the union. Finally, double-check that a < b for every piece; a reversed interval is the most common input error, and the calculator will flag it rather than silently produce nonsense.
Frequently Asked Questions
1. What is the range of a piecewise function?
It is the set of all output values produced by any of the pieces — mathematically, the union of the individual ranges of each piece.
2. Why do linear pieces only need their endpoints checked?
A straight line on an interval has no bends or peaks, so its smallest and largest values must occur at the two ends of the interval.
3. How does the slope sign change the range?
A positive slope makes the function increase, so the range runs from f(a) to f(b). A negative slope makes it decrease, so the range runs from f(b) to f(a). A zero slope gives a single constant value.
4. What do square and round brackets mean in the answer?
Square brackets [ ] mean the endpoint output is actually attained by the function; round brackets ( ) mean the value is approached but never reached because that input end is excluded.
5. How do I enter an open interval like a < x < b?
Choose “a < x < b" from the endpoint-style dropdown for that piece. The calculator then marks both output ends as excluded.
6. Can I use fewer than three pieces?
Yes. Uncheck the pieces you do not need; the calculator only analyzes the checked ones, so one or two pieces work fine.
7. What if two pieces overlap in their outputs?
The union absorbs the overlap. If one piece’s range lies inside another’s, as [3, 5] lies inside [1, 7), the overall range is unchanged by the inner piece.
8. What does a constant piece contribute?
A piece with slope zero maps every x to one value, so its range is the single number {f(a)} — one point, which may still extend the union if nothing else reaches it.
9. Why did the calculator reject my interval?
The start a must be strictly smaller than the end b. A reversed or zero-length interval has no valid x-values, so the calculator asks you to fix it.
10. Does the order of the pieces matter?
No. The union of ranges does not depend on the order you enter the pieces; piece 1, 2, and 3 are just labels for your working.
11. Can the overall range have gaps?
In principle yes, if the pieces’ ranges do not touch. This calculator reports the span from the smallest to the largest output, which is the standard compact answer for connected school problems.
12. How is this different from the domain?
The domain is the set of allowed inputs (the x-intervals you enter); the range is the set of resulting outputs. This calculator derives the outputs from the inputs you give.
13. What do braces { } mean in a range answer?
Braces denote a set with listed members. Here {5} means the range is exactly the single number 5, which happens for constant pieces.
14. Can I use decimals for m, c, a, and b?
Yes. All four fields accept decimals, negative numbers, and fractions written as decimals, such as 0.5 or −2.75.
15. Is my work saved anywhere?
No. Everything runs locally in your browser, so your function definitions stay private and disappear when you leave the page.
Final Thoughts
Finding the range of a piecewise function is really three small habits: evaluate each piece at its endpoints, let the slope tell you which end is the minimum, and carry the open-or-closed status from each input end to its output. The Range Of Piecewise Function Calculator automates exactly those habits and shows its reasoning, so use it to check your hand-written working — and over time, the endpoint analysis it demonstrates will become second nature.