Piecewise Function Calculator
Evaluate and graph piecewise-defined functions, and test continuity at a point.
Enter your values
Format: expression if condition. Conditions like x < 1, -2 <= x < 3, else.
Enter the evaluate at x = you are working with.
Results update instantly as you type — no submit needed. Your values are remembered on this device, and the shareable link reopens the calculator with exactly these numbers.
- f(1)
- 3
- Active branch
- 2x + 1 (x >= 1)
- Left-hand limit
- 0.999998
- Right-hand limit
- 3.000002
- Continuity at x
- Not continuous (jump)
The one-sided limits disagree with f(x), so the graph jumps here.
Working
- 1Locate the branch whose condition contains x = 1 → x >= 1
- 2Substitute into 2x + 1
- 3f(1) = 3
Quick answer
A piecewise function calculator evaluates a function defined by different expressions on different intervals: it picks the branch whose condition contains your x-value, returns f(x), and checks whether the branches meet (continuity) at the breakpoints.
f(x) = { g(x) if x < a ; h(x) if x ≥ a }
At a glance
| What it does | Evaluate and graph piecewise-defined functions, and test continuity at a point. |
|---|---|
| Category | Math |
| Inputs needed | Function definition (one branch per line), Evaluate at x = |
| Main output | f(1) |
| Formula | f(x) = { g(x) if x < a ; h(x) if x ≥ a } |
| Cost | Free — no sign-up, no download |
How to use the Piecewise Function Calculator
- 1Write each branch on its own line as expression if condition.
- 2Enter the x-value you want to evaluate.
- 3The calculator selects the matching branch, substitutes x, and reports f(x).
- 4One-sided limits are compared with f(x) to flag jumps or holes.
Inputs explained
- Function definition (one branch per line)
- Format: expression if condition. Conditions like x < 1, -2 <= x < 3, else.
- Evaluate at x =
- Enter the evaluate at x = you are working with.
Worked example
Using the values the calculator loads with:
Inputs
- Function definition (one branch per line)x^2 if x < 1 2x + 1 if x >= 1
- Evaluate at x =1
Results
- f(1)3
- Active branch2x + 1 (x >= 1)
- Left-hand limit0.999998
- Right-hand limit3.000002
- Continuity at xNot continuous (jump)
- Locate the branch whose condition contains x = 1 → x >= 1
- Substitute into 2x + 1
- f(1) = 3
Frequently asked questions
How do you evaluate a piecewise function?
Find the branch whose condition is true for your x-value, then substitute x into only that expression. Every other branch is ignored for that input.
How do I know if a piecewise function is continuous?
At each breakpoint, compare the left-hand limit, the right-hand limit and the defined value. If all three agree the function is continuous there; if they differ the graph has a jump or a hole.
What conditions can I type?
Single comparisons (x < 2, x >= -1) and compound intervals (-3 <= x < 4), plus 'else' for the remaining domain.
What do I need to enter into the Piecewise Function Calculator?
Just 2 values: function definition (one branch per line), evaluate at x =. Every field starts with a realistic example, so you can change one number at a time and watch the result update instantly.
How does the Piecewise Function Calculator work out the answer?
A piecewise function calculator evaluates a function defined by different expressions on different intervals: it picks the branch whose condition contains your x-value, returns f(x), and checks whether the branches meet (continuity) at the breakpoints. It applies the formula f(x) = { g(x) if x < a ; h(x) if x ≥ a } and shows the working so you can check each step by hand.
Results are estimates for general information. For medical, legal, structural or financial decisions, confirm with a qualified professional.