Piecewise Function

Evaluate and graph piecewise-defined functions

About this calculator

The Piecewise Function Calculator evaluates and graphs a function defined by up to ten pieces, each an expression valid on its own closed interval (bounds may be ±∞). It determines the overall domain, analyzes every junction where two pieces meet — comparing the left and right values to classify the join as continuous or a jump and reporting the jump size — and evaluates f(x) at any point, telling you which piece applies or whether x falls outside the domain.

How to use the Piecewise Function calculator

  1. Enter the values for your problem into the input fields.
  2. Read the result — it updates instantly as you type.
  3. Check the formula and the visual explanation to follow how the answer was found.
  4. Copy the page URL to share the exact calculation.

Common examples

  • x² for x ≤ 0 and x + 1 for x > 0 → jump at x = 0: left value 0, right value 1, jump 1
  • abs(x) built as −x for x ≤ 0 and x for x ≥ 0 → continuous at 0 (both sides give 0)
  • Evaluating the first example at x = 2 → uses the second piece, f(2) = 3
  • x² on [−2, 2] evaluated at x = 5 → outside the domain, no value

Frequently asked questions

How does the Piecewise Function calculator work?

Enter your values and the calculator applies the exact mathematical method for this problem, showing the result together with the formula it used. Everything is computed with high-precision arithmetic, so the answer you see is not limited by ordinary floating-point rounding.

When would I use the Piecewise Function calculator?

It is useful for homework and exam preparation, for checking work done by hand, and whenever a step in a larger problem needs this calculation done quickly and reliably.

How accurate are the results?

Calculations run at 30 significant digits of precision internally. Displayed values are rounded for readability, but the underlying result is far more precise than a typical hand or pocket-calculator computation.

Can I share a specific calculation with someone else?

Yes. Every value you enter updates the URL, so copying the address bar and sharing the link reopens the exact same calculation for whoever clicks it.