Piecewise Function Calculator

Build a piecewise function one branch at a time, graph it with the correct open and closed endpoints, check for overlapping or missing intervals, evaluate f(x) and see whether the function is continuous at each boundary.

Branches

left bound · sign · x · sign · right bound → formula

How the Piecewise Function Calculator works

  1. Enter. x < 1: −x · x ≥ 1: x + 1
  2. Graph. The tool samples the function in your browser and draws it without connecting across breaks.
  3. Read the result. f(1) = 2 (closed dot); Jump at x = 1: not continuous; No overlaps or gaps.
Two-branch piecewise function with an open circle at (1, −1) and a closed dot at (1, 2).
Example: what you enter, the graph the piecewise function calculator draws, and the results it reports.

Examples to load

Reading piecewise notation

f(x) = { −x   if x < 1 ;   x + 1   if x ≥ 1 }

Read each line as “use this formula when x is in this interval”. To find f(1), look for the branch whose interval includes 1. Only the second branch does (x ≥ 1), so f(1) = 1 + 1 = 2. On the graph that branch starts with a closed dot at (1, 2), while the first branch ends with an open circle at (1, −1) because x < 1 excludes 1.

Continuity at a boundary

A piecewise function is continuous at a boundary x = c when the left branch and the right branch meet at the same height and f(c) is defined there. The calculator compares the left limit, the right limit and f(c):

  • Continuous: both limits equal f(c), as in the Continuous join example where x² and 4 meet at (2, 4).
  • Jump: the limits differ, as at x = 1 in the default example.
  • Removable break: the limits agree but f(c) is missing or different — try Point missing at x = 3.

Common mistakes

  • Including a boundary in both branches (≤ on one side and ≥ on the other). That gives two outputs for one input.
  • Drawing every endpoint as a closed dot. Check the inequality sign for each branch separately.
  • Evaluating with the wrong branch. Locate the interval first, then substitute.

Guides: piecewise functions, evaluating piecewise functions and continuity at boundaries.

Questions

What is a piecewise function?

A function defined by different formulas on different intervals of x. Each formula is a branch, and each x must belong to exactly one branch.

What do open and closed circles mean?

A closed (filled) dot means the endpoint is included in that branch, so it gives f at that x. An open circle means the endpoint is excluded: the branch approaches that point but does not reach it.

What happens if two branches overlap?

Then one x would have two outputs, which is not allowed for a function. The calculator reports the overlap so you can fix the intervals.

How do I leave a side unbounded?

Leave the bound empty (or type −inf / inf). For x < 1, leave the left bound empty and enter 1 on the right with <.

Guides that use this calculator

Related calculators

Graphing Calculator

Plot several functions, points and inequalities; find roots, intersections and turning points.