Step Function Calculator

Tune step locations, heights, and offsets in seconds. Scan ranges, then export clean result tables. Understand piecewise jumps with dependable numeric and table output.

Use one step, or sum several steps.
Compute y(x) at this point.
Value before any step activates.
Controls H(x−a) when x equals a.
Step height added after the breakpoint.
Step activates when x ≥ a (rule applies at equality).

Value table across a range
Safety limit to avoid huge exports.

Example data table

Example uses offset = 2, A = 5, a = 1, and equality value = 0.5.
xH(x − a)y(x)
-102
002
10.54.5
217
317

Formula used

This calculator uses the Heaviside step function, written as H(x − a).

Heaviside definition
H(x − a) = 0, if x < a
H(x − a) = h₀, if x = a
H(x − a) = 1, if x > a
Here h₀ is your chosen equality value (0, 0.5, 1, or custom).
Output models
Single: y(x) = offset + A·H(x − a)
Multiple: y(x) = offset + Σ Aᵢ·H(x − bᵢ)
Multiple mode adds each step once x passes its breakpoint.

How to use this calculator

  1. Select Single for one breakpoint, or Multiple to sum several steps.
  2. Enter x and an offset (the baseline value).
  3. Choose the equality rule to control the value when x equals a breakpoint.
  4. Provide A, a for Single mode, or add rows (bᵢ, Aᵢ) for Multiple mode.
  5. Turn on the range table to generate a sequence of values across an interval.
  6. Press Calculate; then export results using CSV or PDF buttons.

Defining a step function precisely

A step function changes value abruptly at one or more breakpoints. In this calculator, the core building block is the Heaviside term H(x−a), which equals 0 before a and 1 after a. The output y(x) is measured in the same units as the offset and step heights, so consistent units matter when modeling real thresholds. To avoid floating roundoff, equality is detected with a tiny tolerance (about 1e−12). Values within that window use the chosen breakpoint rule.

Single-step model for thresholds

For one breakpoint a, the model is y(x)=offset + A·H(x−a). If offset=2, A=5, and a=1, then y(0)=2 and y(2)=7. The computed H(x−a) indicator is useful for debugging: it shows whether the step is inactive (0), active (1), or at the jump.

Multiple steps for piecewise baselines

Many problems require several jumps. Multiple mode evaluates y(x)=offset + ΣAᵢ·H(x−bᵢ). For example, offset=10 with steps (b₁=−1,A₁=3) and (b₂=2,A₂=−1.5) yields y(−2)=10, y(0)=13, and y(3)=11.5. Sorting breakpoints improves interpretability and makes the exported table easier to scan.

Choosing the value at the breakpoint

At x=a, some textbooks define H(0)=0, others use 1, and many analyses prefer 0.5 for symmetry. Your selection affects only the exact breakpoint row, but it can matter in fitting routines or when using the table as test data. A custom equality value lets you match a house convention or a discrete-time rule.

Range tables for validation and export

The range section generates evenly spaced samples from xₛ to xₑ using Δx. Smaller Δx captures rapid transitions around breakpoints, while larger Δx reduces file size. If you set xₛ=−5, xₑ=5, and Δx=0.5, you obtain 21 points for plotting, QA checks, and downstream calculations. CSV and PDF exports reproduce the same grid. Use Max rows to cap outputs; 500–2000 rows suits fast checks. For smoother plots, shrink Δx and the interval instead of exporting huge tables in one click.

Common applications and interpretation

Step models appear in switching circuits, pricing tiers, control deadbands, inventory policies, and piecewise approximations of nonlinear curves. A positive A represents an upward jump; a negative A represents a drop. When you align bᵢ to real thresholds, the graph provides an immediate sanity check that y(x) matches the intended business or physical rule.

FAQs

1) What is the step function used here?

This tool uses the Heaviside step H(x−a): 0 before the breakpoint, 1 after it, and a configurable value exactly at the breakpoint for consistency.

2) Why does the equality value matter?

It only affects rows where x equals a breakpoint, but it can change test fixtures, fitted parameters, and discrete simulations that sample exactly on thresholds.

3) How do multiple steps combine?

Each row contributes Aᵢ·H(x−bᵢ). When x passes bᵢ, that height is added to the running total, so upward and downward steps accumulate into a piecewise-constant curve.

4) What range settings are best for plotting?

Pick xₛ and xₑ to cover all breakpoints, then choose a smaller Δx near jumps. If the table grows too large, narrow the interval instead of forcing huge row counts.

5) Why is my table shorter than expected?

The generator stops when it reaches the Max rows limit. Increase Max rows or use a larger Δx to reduce the number of samples.

6) Can I model downward jumps or offsets?

Yes. Use a negative height A (or Aᵢ) for a drop, and use Offset to set the baseline value before any step activates.

Related Calculators

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.