Loading…

Piecewise Function Calculator

Math Algebra • Functions

View all topics

Add pieces of the form “expression” with a condition like x<0, x>=0, or chained bounds like -2<=x<1. The calculator evaluates in order (first matching piece wins), detects breakpoints, checks left/right limits numerically, and plots with open/closed circles.

Piecewise definition (up to 5 pieces)

Evaluate

Graph window

1000
0.25
Ready

Probe

x=0 · f(x)=… · piece=…
Define pieces and press Calculate. The tool will:
  • Evaluate \(f(x_0)\) by selecting the first matching condition.
  • Detect boundary points and check continuity using left/right limits.
  • Build a table of values around breakpoints.
  • Plot the function with open/closed circles at discontinuities.

Drag to pan. Mouse wheel to zoom (cursor-centered). Hold Shift to pan/zoom vertically. Double-click to reset view.

Rate this calculator

0.0 /5 (0 ratings)
Be the first to rate.
Your rating
You can update your rating any time.

Frequently Asked Questions

How do I write conditions for a piecewise function?

Use comparisons like x<0, x<=2, x>=pi, or x>-1, and you can chain bounds like -2<=x<1 or 0<x<=3. Use otherwise as a catch-all final case when appropriate.

What happens if two piecewise conditions overlap?

If more than one condition is true for the same x, the calculator uses the first matching piece in the list. Reorder or adjust conditions to avoid unintended overlaps.

How does the calculator check continuity at a breakpoint?

At a boundary c it compares the left-hand limit f(c-) and the right-hand limit f(c+) and also checks the defined value f(c). The function is continuous at c when f(c-)=f(c+)=f(c).

What do open and closed circles mean on the graph?

A closed circle indicates the endpoint is included by the condition (such as x<=c), so the function value is defined there. An open circle indicates the endpoint is excluded (such as x<c), showing a hole at that location.

Why does the tool show a table of values around breakpoints?

Sampling just left and right of each breakpoint highlights jumps, holes, and which piece applies on each side. It is a quick numerical check that complements the graph and limit tests.