Cauchy Distribution Calculator

Introduction

This calculator evaluates the Cauchy distribution at a point you choose. Give it a value x, a location x0, and a positive scale γ, and it returns the probability density, cumulative probability, survival probability, and median. If you also enter a probability p between 0 and 1, the calculator will compute the matching quantile. In other words, the page lets you move easily between the two most common tasks: asking how much probability lies to the left of a value, and asking which value corresponds to a chosen percentile.

The Cauchy distribution is famous because it looks deceptively familiar at first glance. It has a central peak like a bell curve, yet its tails are much heavier than the normal distribution's tails. Those heavy tails are not just a cosmetic difference. They change how the distribution behaves in a deep way: the Cauchy distribution has no finite mean and no finite variance. That means common summary statistics such as the sample average can behave erratically even when the sample size becomes very large. Because of this, the Cauchy distribution appears often in textbooks as a warning that not every bell-shaped curve behaves like a Gaussian model.

This is also why a calculator like this is useful. The formulas are simple enough to compute directly, but the results are not always intuitive. A value that seems far from the center can still retain noticeable probability mass because the tail decays slowly. By changing the location and scale and watching the PDF, CDF, survival function, and quantile output respond, you can build a much stronger feel for what heavy-tailed behavior really means in practice.

How to Use

Start with the three main inputs. The field labeled Value x is the point where you want to evaluate the distribution. The field labeled Location x₀ shifts the distribution left or right and marks its median and mode. The field labeled Scale γ controls how spread out the curve is; it must be greater than zero. If you want a quantile, you can also fill in Probability p. Leave that box empty if you only want PDF, CDF, and survival results.

  • PDF f(x): the height of the density curve at the chosen value. This is not the probability of getting exactly that single value; for continuous distributions, exact-point probability is zero.
  • CDF F(x): the probability that a Cauchy random variable is less than or equal to x.
  • Survival S(x): the probability of landing above x. This is simply 1-Fx.
  • Median: always equal to the location parameter x0.
  • Quantile at p: the value whose cumulative probability is p, when p is provided.

Units matter in a straightforward way. The input x and the location x0 should use the same units, whether those are volts, centimeters, degrees, or any other measurement. The scale γ is measured in those same units as well. The density output therefore has inverse units, while the CDF and survival function are unitless probabilities between 0 and 1.

If you are learning the distribution for the first time, a good habit is to keep x0=0 and γ=1 at first. That gives you the standard Cauchy distribution. Then try changing only one parameter at a time. When you move the location, the center shifts but the overall shape stays the same. When you increase the scale, the peak lowers and the curve spreads out, which also pushes quantiles farther from the center.

Formula

Cauchy Probability Density

The Cauchy distribution describes ratios of normal variables and exhibits extremely heavy tails. Its probability density function is

Formula: f x = 1 / (π γ 1 + (x-x_0)/γ^2)

f x = 1 π γ 1 + x - x 0 γ 2

Unlike the normal distribution, the Cauchy distribution lacks finite mean or variance. That means sample averages do not converge to a typical value even for very large samples. Because the density decays only as |x| ^{-2} , extremely large observations remain probable. This property makes the Cauchy distribution an important counterexample in probability theory and underscores the importance of checking assumptions behind statistical estimators.

Distribution Function

The cumulative distribution function (CDF) has a closed form involving the arctangent:

Formula: F x = 1 / π ⁢ ⁡ arctan (x - x_0) / γ + 1 / 2

F x = 1 π arctan x - x 0 γ + 1 2

This step from density to cumulative probability is what the calculator automates. Once the CDF is known, the survival function follows immediately as 1-Fx. If you supply a probability p, the quantile comes from the inverse CDF:

Formula: Q p = x_0 + γ tan π(p - 1 / 2)

Qp=x0+γtanπ(p-12)

This inverse formula helps explain why the tails feel so dramatic. As p approaches 0 or 1, the tangent term can become very large in magnitude. Percentiles near the extremes therefore shoot far into the left or right tail, much more aggressively than they do in many lighter-tailed models.

Interpreting the Result

This step function shows that half of the probability mass lies to the left of the location parameter x 0 . The heavy tails mean the distribution is more spread out than a normal distribution with comparable scale.

The Cauchy distribution arises in various contexts from resonance behavior in physics to Bayesian statistics. Its long tails sometimes model phenomena with rare but extreme deviations. Because its moments do not exist, common methods such as least squares can behave poorly under Cauchy-like noise. In such settings, robust estimators like the median or interquartile range provide more reliable summaries.

When analyzing data, it can be valuable to visualize how quickly probabilities accumulate in the Cauchy distribution. This calculator lets you experiment with different locations x 0 , scales γ , and evaluation points x . Observe how the height of the density function decreases slowly compared with the normal distribution, and how the CDF transitions gradually from 0 to 1. Such experimentation builds intuition for heavy-tailed behavior.

A practical reading tip is to separate the outputs mentally. The PDF tells you how tall the curve is where you are standing. The CDF tells you how much probability is piled up to the left. The survival function tells you how much probability remains to the right. The quantile answers the reverse question: how far out do you need to go to capture a chosen fraction of the distribution? Seeing these side by side often makes the distribution click.

Parameter Intuition

The location parameter x 0 marks the median and mode of the distribution, shifting the entire curve left or right without changing its shape. The scale γ stretches the distribution horizontally; doubling γ doubles the interquartile range and widens the central peak. Unlike the standard deviation in a normal distribution, γ does not correspond to a finite variance, but it still provides a sense of spread.

Because the tails decay so slowly, outliers remain common no matter how narrow γ becomes. This behavior serves as a reminder that the Cauchy distribution resists concentration: even with small scale, extreme values are inevitable.

One especially useful fact is that the middle 50% of the distribution lies between x0-γ and x0+γ. That makes the scale parameter easy to interpret geometrically. If you increase γ, that central interval widens immediately, the peak drops, and tail probabilities at large magnitudes become more substantial.

Origins and Applications

The Cauchy distribution first appeared in Augustin-Louis Cauchy’s work on optical theory, where it described the intensity of light scattered by certain crystals. It later emerged in statistics as the ratio of two independent standard normal variables and as the distribution of the tangent of a uniformly distributed angle. Physicists encounter it when analyzing resonance phenomena, where energy builds up and decays around a central frequency, producing the characteristic peak and long tails.

In modern practice, the Cauchy distribution provides a heavy-tailed prior in Bayesian modeling, especially for parameters that might be large but are expected to be centered around zero. For example, using a Cauchy prior on regression coefficients imposes shrinkage yet allows occasional large effects. Signal processing engineers use the distribution to model impulsive noise, while navigation systems account for measurement errors that follow Cauchy-like behavior when sensors are susceptible to bursts of interference.

Simulation and Sampling

Generating random Cauchy values is as simple as drawing a uniform variable U on (0,1) and computing x 0 + γ × tan π ( U - 1 / 2 ) . Because this transformation involves the inverse CDF, it yields exact samples. Visualizing histograms of simulated values highlights how frequently observations stray far from the center, reinforcing the notion of heavy tails.

Monte Carlo simulation also offers a way to approximate probabilities. To estimate the chance that X exceeds 10 when x 0 = 0 and γ = 1 , generate many samples and count how many exceed that threshold. The proportion should align with the survival function computed by this calculator, providing an empirical check on the formula.

That simulation perspective is useful because the Cauchy distribution often feels surprising until you actually watch samples appear. A handful of points may cluster near the center, and then a few observations suddenly leap far into the tail. The formula has been telling you this all along; simulation simply makes the lesson visible.

Median and Quantiles

Because the Cauchy distribution lacks a finite mean, analysts often use the median to describe its center. For the standard Cauchy, both the median and mode occur at zero, aligning with the location parameter x 0 . Quantiles are easy to compute from the inverse CDF. For example, the 75th percentile lies at x 0 + γ , while the 25th percentile is one scale unit below the median. These wide-spaced quantiles reflect the distribution's propensity for extreme values.

For classroom work or quick sensitivity checks, that fact is especially handy. If you want the interquartile range, you do not need complicated numerical integration; for a Cauchy distribution it is simply 2γ. This makes the scale parameter memorable even though mean and variance are unavailable.

Worked Example

Suppose a physics experiment records resonance frequencies with occasional large deviations. If you model the measurement error with a Cauchy distribution at x 0 = 0 and γ = 2 , an observation at x = 5 has a density of 1 π × 2 × 1 + 5 2 2 . Although such a value is far from the median, it remains plausible because of the heavy tails. Running the calculator with these parameters lets you inspect both the PDF and CDF at that point and compare the likelihood to a normal model.

Numerically, this setup gives a PDF of about 0.02195 and a CDF of about 0.87888, so the survival probability is still about 0.12112. That is the kind of result that feels surprisingly large if you are used to lighter-tailed distributions. The worked example shows why the calculator is helpful: it converts a symbolic formula into a concrete sense of scale.

Estimating Parameters

Fitting a Cauchy distribution to data requires robust methods. The sample median is a consistent estimator for the location, while the half interquartile range estimates the scale. Maximum likelihood estimation is possible but more numerically challenging because the likelihood surface is flat near its maximum. Analysts often combine graphical tools like quantile plots with these simple estimators to judge how well the Cauchy model fits observations.

These estimation ideas also explain why the median shown by the calculator is so central. In a Cauchy setting, the median is not a backup summary used only when the mean is inconvenient; it is often the summary that keeps the interpretation stable.

Limitations

The absence of finite moments means that sample means and variances are unreliable. Even after thousands of observations, the average of Cauchy data can wander arbitrarily far from x 0 . Analysts should rely on medians and interquartile ranges instead of means and standard deviations. When fitting models, algorithms that assume quadratic loss—like ordinary least squares—may fail catastrophically under Cauchy errors; robust alternatives such as least absolute deviations fare better.

Another pitfall is misinterpreting the scale parameter as a standard deviation. Because γ measures half the interquartile range, it cannot be compared directly to standard deviations from other distributions. Remembering this distinction prevents misleading comparisons between Cauchy and Gaussian models.

The calculator itself also has a few straightforward assumptions. The scale must be strictly positive, the optional probability p must lie strictly between 0 and 1, and all numeric outputs are floating-point approximations. Very extreme quantiles can become enormous in magnitude because the tangent term grows quickly near the endpoints. That is not a bug; it is part of the mathematics of the distribution.

Further Reading

Heavy-tailed distributions such as the Cauchy appear in areas ranging from signal processing to finance. Texts on robust statistics offer strategies for handling such data, and many mathematical software packages provide built-in functions for the PDF, CDF, and quantile calculations. Experimenting with this calculator can serve as a springboard to those deeper explorations.

Enter a value x, choose the location x0 and positive scale γ, and optionally provide a probability p to compute a quantile.

Copy status will appear here after you calculate a result.

Enter parameters and x.

Mini-Game: Tail Target

This optional arcade mini-game turns the calculator’s ideas into a fast visual challenge. You steer a probe along the horizontal axis and try to match a target cumulative probability Fx. The Cauchy curve keeps drifting as the location x0 and scale γ change, so a target such as 0.95 can suddenly jump deep into the tail. It is a playful way to feel how quantiles stretch in a heavy-tailed model.

Score0
Time75.0s
Streak0
TargetF(x) = 0.50
Best0

Tail Target

Move the glowing probe until its shaded area matches the target CDF shown in the HUD. Hold near the correct spot to bank points, build streaks, and survive the late-wave tail rush.

  • Pointer or touch: slide anywhere on the canvas.
  • Keyboard fallback: use ← and → or A and D.
  • Goal: lock in matches quickly before the curve shifts again.

Educational takeaway: for a Cauchy distribution, extreme probabilities map to far-away x-values because the inverse CDF uses a tangent, and tangent grows rapidly near the ends.

Embed this calculator

Copy and paste the HTML below to add the Cauchy Distribution Calculator - PDF, CDF, Survival Function, and Quantiles to your website.