How to Calculate Gamma Exposure (GEX): Formula + Real SPY Example | FlashAlpha

How to Calculate Gamma Exposure (GEX): Formula + Real SPY Example

The GEX formula, step by step: gamma x open interest x 100 x spot squared x 0.01, calls positive and puts negative, summed across the chain. Includes a worked example with real SPY numbers that reconciles to the live API to the dollar, what net GEX does to dealer order flow, the common variants and pitfalls, and a Python snippet to compute it yourself.

T
Tomasz Dobrowolski Quant Engineer
Jul 22, 2026
19 min read
GEX GammaExposure HowTo OptionsEducation DealerPositioning Quant

How do you calculate gamma exposure? Take each option contract's gamma, multiply by its open interest, by the 100-share contract multiplier, by spot price squared, and by 0.01 - that is the dollar hedging pressure a 1% move creates for that contract. Sign calls positive and puts negative, sum the whole chain, and the total is net GEX: the number everyone quotes and almost nobody derives. Here is the full derivation, a worked example you can verify, and the interpretation layer that connects the number to order flow.

The formula

Per strike, per side:

GEX = Γ × OI × 100 × S² × 0.01
  • Γ - the option's gamma (per share, from BSM or your feed)
  • OI - open interest in contracts
  • 100 - shares per contract
  • S² × 0.01 - converts share-gamma into dollars of delta change for a 1% spot move (0.01 × S is the move, × S again prices the resulting delta in dollars)
  • Sign: calls positive, puts negative; Net GEX = sum over every strike and expiry

Step by Step

  1. Pull the chain with greeks and open interest. You need gamma and OI for every contract, plus spot. The /optionquote/{symbol} endpoint returns both per expiry (Growth plan) - or skip the raw math entirely and read the precomputed result from the Free-tier GEX endpoint shown below.
  2. Compute dollar gamma per contract line: Γ × OI × 100 × S² × 0.01.
  3. Apply the sign convention: call lines positive, put lines negative. (Why: the standard positioning assumption is that dealers are net long the calls customers sold overwriting, and net short the puts customers bought as protection - so dealer gamma is positive via calls, negative via puts.)
  4. Sum per strike to get the GEX profile (the chart everyone posts), then sum everything for net GEX.
  5. Find the flip: the spot level where cumulative net GEX crosses zero is the gamma flip - above it dealers dampen moves, below it they amplify. (Methodology details: Gamma Flip Methodology.)

Worked Example with Real SPY Numbers

SPY on June 5, 2024 at 10:00 ET, spot $530.10, same-day expiry, strike 530 - pulled from the FlashAlpha historical replay so every input is checkable:

Input Call side Put side
Gamma0.125840.11959
Open interest16,52511,636
S² × 100 × 0.01530.10² = 281,006 (the 100 and 0.01 cancel)
Call GEX = 0.12584 x 16,525 x 281,006  =  +$584.3M  per 1% move
Put GEX  = 0.11959 x 11,636 x 281,006  =  -$391.0M  per 1% move
                                          -----------
Net GEX at the 530 strike               =  +$193.3M

Cross-check against the API for the same timestamp: it served call_gex: 584,331,580, put_gex: -391,041,274, net_gex: 193,290,306 for that strike. The hand calculation reconciles to rounding - there is no proprietary magic in the number, just this formula applied to clean greeks and open interest. Summing every strike and expiry on the chain that morning gave a whole-chain net GEX of +$1.57B.

Prefer today's numbers to June 2024's? Open the free GEX chart, load SPY, and run the same arithmetic on any strike you see - the per-strike bars are exactly this formula, recomputed from live greeks. No account needed to check the math.

What Net GEX Does to Order Flow

The reason GEX matters is that it is a forecast of mechanical, price-insensitive order flow. Dealers hedge their books delta-neutral, and gamma tells you how much delta appears when spot moves:

  • Positive net GEX (+$1.57B in the example): a 1% rally hands dealers +$1.57B of delta, which they sell to re-hedge - about 3 million SPY shares of supply into strength ($1.57B ÷ $530). A 1% drop forces the same size of buying into weakness. Dealers trade against the move: ranges compress, dips get bought, moves mean-revert.
  • Negative net GEX: the signs flip. A sell-off forces dealers to sell more, a rally forces them to chase. Dealers trade with the move: trends extend, ranges expand, and crashes accelerate - March 16, 2020 is the canonical replay.
  • Per-strike GEX localizes the flow: the largest positive strikes act as magnets and walls (call wall, put wall), because hedging pressure concentrates where the gamma lives.

Variants and Pitfalls

  • Per 1% vs per $1: some sources compute GEX per 1-point move (drop the ×0.01×S, keep one S). Both are fine - just never compare numbers across conventions. FlashAlpha publishes per 1%.
  • Share GEX vs dollar GEX: dividing dollar GEX by spot gives shares-to-trade per 1% - often more intuitive for sizing the flow.
  • Fixed signs vs flow-signed: the calls-positive/puts-negative convention is an assumption about who is long what. Flow-signed GEX infers dealer polarity from actual trade flow instead - see Flow-Signed GEX Polarity and Live vs Settled GEX.
  • Stale OI: open interest updates once a day, before the open. Intraday GEX changes come from gamma and spot, not OI - a huge morning flow day is invisible to settled-OI GEX until tomorrow (that is what the flow endpoints are for).
  • 0DTE greeks are unstable: near expiry gamma explodes near the money and dies away from it, so same-day GEX needs minute-fresh greeks, not yesterday's.

Calculate It Yourself in Python

import httpx

BASE = "https://lab.flashalpha.com"
H = {"X-Api-Key": "YOUR_API_KEY"}

# spot + reference values from the precomputed endpoint (Free tier)
ref = httpx.get(f"{BASE}/v1/exposure/gex/SPY", headers=H).json()
S = ref["underlying_price"]

# raw per-contract quotes run on the Growth plan
expiries = httpx.get(f"{BASE}/v1/options/SPY", headers=H).json()["expirations"]

net = 0.0
for exp in expiries:
    for c in httpx.get(f"{BASE}/optionquote/SPY", params={"expiry": exp}, headers=H).json():
        if c.get("gamma") and c.get("open_interest"):
            gex = c["gamma"] * c["open_interest"] * 100 * S * S * 0.01
            net += gex if c["type"] == "C" else -gex

print(f"hand-rolled net GEX: ${net/1e9:.2f}B per 1% move")
print(f"API net GEX:         ${ref['net_gex']/1e9:.2f}B, flip {ref['gamma_flip']}")

If you would rather not run the loop, /v1/exposure/gex/{symbol} returns the per-strike profile, net GEX, and the gamma flip precomputed - on the Free tier, no card required - and the free GEX chart renders it live for 6,000+ symbols with zero code.

Honest limitations. GEX is an estimate built on two assumptions: that open interest sits mostly on dealer books, and that the fixed sign convention describes who is long what. Both are usually roughly right for index products and sometimes wrong for single names around events. The formula is exact; the positioning interpretation is a model. Treat magnitudes and levels as strong signals, single-digit precision as false comfort.

Related Articles

Free tier · no card required
Skip the spreadsheet - live GEX for 6,000+ symbols
Per-strike GEX, net GEX, gamma flip, call and put walls - computed live on every request, free chart and free API endpoint.
Open the free GEX chart →

Get a free API key GEX endpoint docs

Frequently Asked Questions

For each option contract: gamma times open interest times 100 (contract multiplier) times spot price squared times 0.01. That gives dollars of dealer delta change per 1% move. Sign call contracts positive and put contracts negative, then sum across all strikes and expirations for net GEX. Example: a SPY 530 call with gamma 0.12584 and 16,525 open interest at spot 530.10 contributes about +$584 million per 1% move.
One factor of S sizes the move: a 1% move is 0.01 times S dollars, and gamma times that move is the delta picked up. The second factor of S converts that delta (in shares) into hedge notional in dollars. Multiply both and you get S squared times 0.01. If you want GEX per $1 move instead of per 1%, you drop the 0.01 and one factor of S.
It encodes the standard positioning assumption: customers tend to sell calls (covered calls, overwriting) and buy puts (protection), which leaves dealers net long calls and net short puts. Long options carry positive gamma, short options negative. It is an assumption, not a law - flow-signed GEX methods infer the actual dealer side from trade data instead of assuming it, and can flip the sign on individual strikes.
Net GEX is a forecast of mechanical dealer hedging flow. With positive net GEX, dealers must sell into rallies and buy into dips to stay delta-neutral - price-insensitive flow that compresses ranges and dampens moves. With negative net GEX, dealers sell weakness and buy strength, amplifying moves and extending trends. Divide dollar GEX by spot to size it in shares: +$1.57B net GEX on SPY at $530 means roughly 3 million shares traded against every 1% move.

Conclusion

GEX is one multiplication and one sum: gamma × OI × 100 × S² × 0.01, calls minus puts, across the chain. The worked example reconciles to the published API values to the dollar because there is nothing else in the number - the value is not in the arithmetic but in the freshness of the greeks, the handling of the sign assumption, and the interpretation into order flow. Compute it yourself with the snippet above, or pull it precomputed from the free GEX endpoint and spend your time on the part that actually needs judgment.

Live Market Pulse

Get fast visibility into market shifts with full-chain analytics over low-latency REST and MCP polling.

Intelligent Screening

Screen millions of option pairs per second using your custom EV rules, filters, and setups.

Export-Ready

Export structured signals to your own execution stack or broker integration - FlashAlpha delivers the analytics, you keep control of order routing.

Join the Community

Discord

Engage in real time conversations with us!

Twitter / X

Follow us for real-time updates and insights!

GitHub

Explore our open-source SDK, examples, and analytics resources!