Precalculus Intermediate

Piecewise Function Grapher & Evaluator

Graph and evaluate piecewise-defined functions with up to 3 pieces. Identify domain, range, and continuity, evaluate at any x value, and see open/closed boundary circles on the graph.

Live Calculator · Step-by-Step · Precalculus
Define Piecewise Function
Examples
Results
Define your piecewise function, then press Graph & Analyze to see the graph, domain, evaluation, and continuity report.
Domain
Range (est.)
Evaluation
Continuity
Step-by-Step Solution
Graph
Piece 1
Piece 2
Piece 3
Closed endpoint
Open endpoint
What is a Piecewise Function?
f(x) = { expr₁, condition₁ ; expr₂, condition₂ ; … }

A piecewise function is defined by different expressions on different parts of its domain. Each "piece" has its own formula and a condition specifying which x values it applies to.

Example: the absolute value function is piecewise — it equals −x when x < 0, and x when x ≥ 0.

Pieces must collectively cover every x in the domain with no overlaps (each x belongs to exactly one piece).

To evaluate f(a), first find which condition a satisfies, then plug a into that piece's expression.
Continuity at a Boundary
lim x→c⁻ f(x) = lim x→c⁺ f(x) = f(c)

A piecewise function is continuous at x = c if the left-hand limit, right-hand limit, and the function value all agree. If any differ, there is a discontinuity.

Types of discontinuities:

  • Jump: left and right limits exist but differ
  • Removable: limits agree but don't equal f(c)
  • Infinite: a limit is ±∞

This tool checks each internal boundary by computing both one-sided limits numerically.

Need help with piecewise functions?

A live tutor can walk you through defining pieces, graphing them by hand, and checking continuity — step by step.

Book a Session →