Expected Shortfall Calculator

Expected shortfall-12.00%
Value at risk (empirical)-12.00%
Tail observations averaged1
Worst single return-12%
How this was calculated
  1. The 8 period returns, worst first: -12%, -8%, -4%, -1%, 2%, 3%, 5%, 7% — expected shortfall works on the tail of this empirical distribution, with no normality assumption.
  2. At 95% confidence the tail is the worst 5% of outcomes: ceil(0.05 x 8) = 1 observation(s) deep.
  3. Value at risk is the mildest loss inside that tail, -12.00% — the loss level that is breached in the worst 5% of periods.
  4. Expected shortfall averages the tail: ((-12%)) / 1 = -12.00% — the mean return given that a tail period has happened.
  5. Regulators favour expected shortfall over VaR — Basel's market-risk framework is built on a 97.5% ES — because it prices how bad the bad periods get, not just where they start; on a small sample the tail is coarse, so read the figure as an estimate.

This expected shortfall calculator estimates the average loss in the worst tail of a return distribution beyond a chosen confidence level. Expected shortfall (ES), also called CVaR or average VaR, is the average return in the worst tail of a distribution beyond the confidence level — at 95%, the mean of the worst 5% of outcomes. Value at risk (VaR) is the mildest loss inside that same tail: ES always sits at or beyond VaR, and the gap between them measures how heavy the tail is. The calculator works empirically: it sorts the returns you enter and averages the worst k, where k = ceil((100 - confidence)% x n) — no normality assumption is made. On small samples the tail is coarse: at 95% confidence with 8 observations the tail is a single point, so ES equals the worst return — a known limitation, not an error.

ES is a coherent risk measure in the sense of Artzner et al.: it rewards diversification, which VaR can fail to do. This is why Basel's Fundamental Review of the Trading Book moved bank market-risk capital from VaR to a 97.5% expected shortfall because ES prices how bad bad periods get, not just where they start. This page shows the formula, step-by-step workings, worked examples and sources.

Worked examples

95% over eight periods

Primary result: -12.00% — At 95% confidence the tail is a single observation deep on eight data points, so ES equals the worst return. (95% · 8 returns · -12 · -8 · -4 · -1 · 2 · 3 · 5 · 7)

Expected shortfall-12.00%
Value at risk (empirical)-12.00%
Tail observations averaged1
Worst single return-12%

80% over eight periods

Primary result: -12.00% — An 80% tail averages two observations: ES of -12.00% against a VaR of -9.00%. (80% · 8 returns · -15 · -9 · -5 · -3 · 1 · 4 · 6 · 8)

Expected shortfall-12.00%
Value at risk (empirical)-9.00%
Tail observations averaged2
Worst single return-15%

90% over six periods

Primary result: -20.00% — One catastrophic -20% period dominates the 90% tail of this six-period sample. (90% · 6 returns · -20 · -2 · 0 · 5 · 9 · 12 · 0 · 0)

Expected shortfall-20.00%
Value at risk (empirical)-20.00%
Tail observations averaged1
Worst single return-20%

How expected shortfall is calculated here

This expected shortfall calculator works empirically, meaning it uses the returns you enter directly rather than fitting them to a normal curve or any other assumed distribution. The first step is to sort your returns from worst to best. Value at risk, by contrast, is simply read off from this sorted list at the percentile matching your confidence level — it is the single return sitting at that boundary. Expected shortfall goes further: it averages every return deeper in the tail, capturing the full severity of the worst outcomes rather than just the threshold where the tail begins.

Next, the calculator determines the tail depth from your confidence level. If you set confidence at 95%, the tail contains the worst 5% of outcomes. The number of returns averaged is k = ceil((100 - confidence)% x n), where n is the total number of returns you entered. The ceiling function ensures the tail always includes at least one observation. VaR, in contrast, reads off only the return at the boundary of that tail — the mildest loss inside it — so it ignores how far the remaining returns extend into negative territory. ES always sits at or beyond VaR, and the gap between them measures how heavy the tail is.

Finally, the calculator averages those worst k returns to produce the expected shortfall value. Because ES is the mean of the worst tail beyond the confidence level, it reflects how bad bad periods actually get. This is why Basel's Fundamental Review of the Trading Book moved bank market-risk capital from VaR to a 97.5% expected shortfall: ES prices how bad bad periods get, not just where they start. It is also a coherent risk measure in the sense of Artzner et al., meaning it rewards diversification, which VaR can fail to do.

One limitation worth noting: on small samples the tail is coarse. At 95% confidence with 8 observations, the tail is a single point, so ES equals the worst return — a known limitation, not an error. As your sample grows, the tail fills in and the average becomes more stable.

  • Sort returns from worst to best — VaR reads off the boundary point; ES averages everything beyond it
  • Find tail depth: k = ceil((100 - confidence)% x n), where n is the number of returns entered
  • Average the worst k returns to get expected shortfall — no normality assumption is made
  • ES always sits at or beyond VaR; the gap between them measures how heavy the tail is
  • On small samples the tail can be a single point, so ES equals the worst return
Expected shortfall, also called CVaR or average VaR, is the average return in the worst tail of a distribution beyond the confidence level — at 95%, the mean of the worst 5% of outcomes. Because it averages the full tail rather than reading off a single threshold, it captures severity that VaR misses.

Expected shortfall vs value at risk

Value at risk and expected shortfall answer two different questions about the same tail of a return distribution. Value at risk (VaR) identifies where losses start: at a 95% confidence level, VaR is the mildest loss inside the worst 5% of outcomes. Expected shortfall (ES), also called CVaR or average VaR, asks how bad those losses average once you are inside that tail — at 95%, it is the mean of the worst 5% of outcomes. Because ES averages every point beyond the confidence threshold while VaR reports only the threshold itself, ES always sits at or beyond VaR. The gap between the two numbers measures how heavy the tail is: a small gap means losses cluster near the threshold, while a large gap signals that extreme outcomes pull the average well past the point where losses begin.

That distinction is why bank regulators changed course. Basel's Fundamental Review of the Trading Book moved bank market-risk capital from VaR to a 97.5% expected shortfall because ES prices how bad bad periods get, not just where they start. A trading desk can hold VaR steady while the tail behind it grows heavier, leaving the capital buffer blind to the very losses that matter most. Expected shortfall closes that blind spot by averaging the entire tail, so a fatter tail translates directly into a higher capital requirement.

Expected shortfall also fixes a theoretical problem that VaR cannot. ES is a coherent risk measure in the sense of Artzner et al.: it rewards diversification, which VaR can fail to do. A portfolio that combines two positions can, under VaR, show a higher risk number than either position held alone — a result that contradicts the basic logic of diversification. Expected shortfall averages across the tail in a way that respects subadditivity, so combining risks tends to reduce measured risk rather than inflate it.

This expected shortfall calculator works empirically: it sorts the returns you enter and averages the worst k, where k = ceil((100 - confidence)% x n) — no normality assumption is made. The trade-off is that on small samples the tail is coarse: at 95% confidence with 8 observations the tail is a single point, so ES equals the worst return — a known limitation, not an error. As the sample grows, the tail fills in and the average becomes more stable, which is why ES is best read alongside the sample size that produced it.

VaR tells you where the tail starts; expected shortfall tells you what the tail averages. The gap between them is a quick read on tail weight — and the reason Basel replaced VaR with 97.5% ES for bank market-risk capital.

Choosing a confidence level

The confidence level you choose for an expected shortfall calculator controls how deep into the loss distribution the tool reaches. At 95% confidence, ES is the average of the worst 5% of outcomes — the mean return in the left tail beyond the 95th percentile. Move to 99% and you are averaging roughly a fifth as many points, which means a thinner but more extreme slice of the data. A 97.5% level sits in between, capturing the worst 2.5% of observations.

On realistic sample sizes the difference matters in a practical way. This calculator works empirically: it sorts the returns you enter and averages the worst k, where k = ceil((100 - confidence)% x n), with no normality assumption made. At 95% confidence with 8 observations the tail is a single point, so ES equals the worst return — a known limitation, not an error. Push the confidence to 99% with the same 8 observations and k rounds to 1 as well, but the threshold you are measuring from shifts deeper. In small samples the tail is coarse regardless of the level you pick; the choice mainly changes how many points survive in the average on larger datasets.

Basel's Fundamental Review of the Trading Book moved bank market-risk capital from VaR to a 97.5% expected shortfall because ES prices how bad bad periods get, not just where they start. Value at risk is the mildest loss inside that same tail: ES always sits at or beyond VaR, and the gap between them measures how heavy the tail is. A 99% level would reach further into extreme losses, but regulators settled on 97.5% as a balance — deep enough to capture meaningful tail risk without shrinking the averaging window so much that the estimate becomes unstable on the data banks actually hold.

ES is a coherent risk measure in the sense of Artzner et al.: it rewards diversification, which VaR can fail to do. That property holds at any confidence level, so the choice of 95%, 97.5%, or 99% does not change the mathematical soundness of the measure — only the depth and stability of the tail it examines.

  • 95% confidence averages the worst 5% of outcomes — the widest tail, most stable on small samples, but less focused on extremes.
  • 97.5% confidence averages the worst 2.5% — the Basel choice, balancing tail depth with enough points to keep the estimate stable.
  • 99% confidence averages the worst 1% — the deepest reach into extreme losses, but the fewest points feeding the average on any given dataset.
On small samples the tail is coarse: at 95% confidence with 8 observations the tail is a single point, so ES equals the worst return. This is a known limitation of empirical estimation, not an error in the calculation.

Limits of the empirical method

The empirical method behind this expected shortfall calculator is deliberately simple: it sorts the returns you enter and averages the worst k, where k = ceil((100 - confidence)% × n), with no normality assumption made. That transparency comes with trade-offs. The approach treats your input data as the full picture of future risk, assuming past returns represent the distribution yet to come. When markets shift structurally — through regime changes, new correlations, or unprecedented events — historical samples may understate or misplace the tail entirely.

Small samples make the problem concrete. At 95% confidence with 8 observations, the tail is a single point, so ES equals the worst return in your dataset. This is a known limitation, not an error: the formula is doing exactly what it should with the information given. But the result is coarse. Expected shortfall, also called CVaR or average VaR, is meant to capture the average return in the worst tail of a distribution beyond the confidence level — at 95%, the mean of the worst 5% of outcomes. When that 5% consists of one data point, the average and the extreme collapse into the same number, and you lose the signal that distinguishes ES from value at risk. Recall that VaR is the mildest loss inside that same tail: ES always sits at or beyond VaR, and the gap between them measures how heavy the tail is. A single-point tail erases that gap.

Coarse tails compound the challenge. With limited data, the shape of the tail beyond your worst observation is invisible. You cannot tell whether the true distribution continues smoothly, thickens, or thins. This matters because ES is a coherent risk measure in the sense of Artzner et al.: it rewards diversification, which VaR can fail to do. But coherence depends on a distribution that is adequately sampled. When the tail is sparse, diversification benefits and tail heaviness alike become hard to estimate reliably.

These limits do not invalidate the empirical approach for everyday use, but they do signal when a parametric or filtered method is warranted. Parametric models assume a specific distribution — often normal or Student's t — and can estimate tail behavior beyond the observed data, at the cost of distributional assumptions that may themselves be wrong. Filtered historical simulation, which weights or scales returns by current volatility, offers a middle ground: it keeps the empirical shape but adjusts for changing market conditions. The choice depends on your data depth, the stability of the return process, and how much tail resolution you need.

Basel's Fundamental Review of the Trading Book moved bank market-risk capital from VaR to a 97.5% expected shortfall because ES prices how bad bad periods get, not just where they start. That regulatory shift reflects the same logic any user should apply: know when your sample is too thin or too coarse to support the tail estimate, and reach for a complementary method when it is.

FAQs

What is expected shortfall?

Expected shortfall is the average loss in the worst (100 - confidence)% of outcomes. At 95% it is the mean return of the worst 5% of periods. It gives you a sense of how bad things can get in the tail, not just the threshold.

How is expected shortfall calculated?

Sort returns worst-first, take the worst ceil((100-c)% x n) of them, and average. This page does exactly that, empirically. No distributional assumptions are made — the calculator works directly from your data to produce the tail average.

What is the difference between ES and VaR?

VaR is the mildest loss in the tail; ES is the average loss across the whole tail. ES is always at least as severe as VaR. While VaR tells you where the tail begins, ES tells you what the typical loss within that tail looks like.

Why do regulators prefer expected shortfall?

Basel's market-risk framework uses 97.5% ES because it captures tail severity and is a coherent risk measure that rewards diversification. Unlike VaR, ES accounts for how deep losses can run beyond the threshold, making it a more reliable gauge of extreme risk.

What confidence level should I use?

95% is the common reporting level; 97.5% is the Basel standard; 99% needs a large sample or the tail becomes a single observation. Choose based on your data size and reporting needs — higher confidence means fewer tail periods informing the average.

Can expected shortfall be positive?

Yes — if even the tail periods were profitable, the tail average is a gain, which simply means the sample had no losing tail. A positive ES indicates that the worst periods in your dataset still produced returns rather than losses.

Sources

Related calculators

Value at Risk (VaR) Calculator
Parametric (variance-covariance) VaR: the loss a portfolio is not expected to exceed over a chosen horizon at 90%, 95% or 99% confidence, assuming normally distributed returns.
Max Drawdown Calculator
Maximum drawdown of a value series — the worst peak-to-trough fall and the gain needed to break even again.
Expected Return Calculator
The weighted average return of a three-asset portfolio: each asset's expected return weighted by its share of the portfolio.