Algebra II and functions

Piecewise Function Calculator

Enter up to six rules, each with its own lower and upper bounds. The calculator evaluates the one branch that contains your x value and flags gaps or overlaps.

Enter values

Leave a lower or upper bound blank for an unbounded end. Check a box to include that endpoint. Expressions support numbers, x, +, −, *, /, ^, and parentheses.

Branch 1
Branch 2
Branch 3
Branch 4 (optional)
Branch 5 (optional)
Branch 6 (optional)

Result

Enter values and select Calculate.

Method and worked example

Check each entered interval against x. Exactly one interval must match; then evaluate only its rule. Missing coverage is a gap, and more than one matching interval is an overlap.

Example: With x+2 for x<0, x² for 0≤x≤3, and 10 for x>3, f(3)=9.

Assumptions and limitations

This is point evaluation, not graphing or a symbolic continuity proof. The arithmetic grammar is deliberately restricted and has length, token, and nesting limits.

Calculations run in this browser. The page does not upload entered values, add them to URLs, or save them to browser storage.

Common checks

  • Confirm coefficient signs and the selected mode before interpreting the result.
  • Remember that interval endpoints depend on strict versus inclusive comparisons or bounds.
  • Keep full precision through the method; rounded display values are for reading.

Method source

OpenStax mathematics reference. The interface and calculations are independently implemented.

Related tools

Quadratic Formula Calculator · Factoring Calculator · All calculators