How this instrument works
The error function erf(x) measures how much of a standard bell curve's area piles up within a given distance of its center, which is exactly why it sits underneath the normal distribution's cumulative probability: converting a z-score into a percentile is, underneath the notation, evaluating a rescaled erf. Like the Bessel function, it has no elementary closed form, so an exact figure is out of reach through ordinary arithmetic alone — getting a number out of erf at all means turning to an infinite series.
This sheet computes the first four terms of erf's own Maclaurin expansion, each built from odd powers of whatever value is entered, scaled by the constant 2⁄√π out front — the same expression shown in the formula box above. Every term left off the end of that infinite series still contributes something, however small, so the figure returned here is a close estimate rather than the function's exact value — an honest limitation any truncated series carries, not a hidden flaw in this one.
Four terms track erf tightly near an input of 0 and lose ground gradually as that input grows in magnitude, so staying within 1 either side of zero is recommended here. Set the input to 0.5 and the four-term sum comes to about 0.52049008, against a true value near 0.52049988 — agreement to four decimal places. Set it to 0.3 instead, closer still to the center, and the sum reaches about 0.32862666 versus a true value near 0.32862676, matching to six decimal places instead — proof that the smaller the input, the tighter this particular truncation holds.
- Enter the value into the x (small values recommended, |x| ≤ 1) field — this is the point at which erf gets estimated.
- Read the outcome in the erf(x), 4-term Maclaurin approximation field, the four-term sum for whatever was entered above.
- Start with an input of 0 to confirm the baseline of exactly 0.0, since erf is centered symmetrically there.
- Try an input of 0.5 to see how closely four terms already track the true cumulative-probability value.
- Stay within the recommended range of about 1 either side of zero; larger inputs widen the gap between this estimate and the true erf(x).
Worked example — inputs of 0, 0.3, and 0.5
With the input at 0, every term in the series carries a positive power of that same input, and any positive power of 0 is 0, so erf(0) = 0.0 exactly — the function's own center, where a bell curve has accumulated exactly half its probability on either side.
Set the input to 0.3 and the four terms sum to 0.3 − 0.009 + 0.000243 − 0.0000052, scaled by 2⁄√π, landing on about 0.32862666 against a true value near 0.32862676 — agreement to six decimal places. Set it to 0.5 instead and the same steps give about 0.52049008 against a true value near 0.52049988, matching to four decimal places instead — a slightly looser fit, exactly what is expected once the input has drifted further from the series' center.
Questions
What does erf(x) measure?
It measures the share of a standard bell curve's area that falls within a given distance of its center, so erf(x) is the building block behind the normal distribution's cumulative probability — turning a z-score into a percentile is, underneath the surface, a rescaled evaluation of this same function.
Why is the answer only an approximation?
Because erf has no elementary closed form, so exact evaluation calls for an infinite series, and this sheet keeps only its first four terms. Every extra term the true series carries beyond those four nudges the value slightly closer to exact, so the figure returned here is a close estimate rather than the function's precise value.
How close does the four-term sum come to the true erf(x)?
Close, for small inputs: set it to 0.3 and the match holds to six decimal places; set it to 0.5 and it still holds to four. That gap widens as the input grows past roughly 1 in magnitude, which is why keeping it within about that range is recommended for this particular truncation.
Why is zero the exact center of this approximation?
Because erf is an odd function, symmetric about the origin, satisfying erf(−x) = −erf(x) — and every term in its series involves an odd power of the input, so at zero each term is 0 and erf(0) = 0.0 exactly, with no truncation error at that single point.
What is the real-world reason anyone needs erf at all?
It underlies cumulative-probability calculations for the normal distribution — converting a raw z-score into 'what fraction of outcomes fall within this range' runs through a rescaled erf. Anywhere bell-curve statistics show up, from test scores to measurement uncertainty, that conversion is erf at work, whether or not the name is spoken aloud.
Why does the recommended range stop around a magnitude of 1 rather than further out?
Because the terms dropped from the true infinite series grow in relative size as the input's magnitude increases, so the four terms kept here capture less of the whole the further out that value sits. Within about 1 either side of zero the omitted terms stay small enough for a tight match; beyond that point the gap opens more quickly.