Order-Book Impact & Capacity Calculator
RISK/STATS · ORDER-BOOK IMPACT · ADVANCED
Walk a supplied order book for a target notional (VWAP and price impact in bps), or solve for the max notional that stays inside an impact budget via bisection.
One level per line, any order. Size is in base-asset units (e.g. BTC).
Walking the book
A single displayed price (last trade, mid, top of book) doesn't tell you what YOU will actually pay for a given size: a large order consumes multiple price levels, each one worse than the last. This calculator walks the actual order book, level by level, until your target size is filled, and reports the volume-weighted average price (VWAP) you'd really get.
- mid = (best bid + best ask) / 2
- impact (bps) = (VWAP / mid − 1) × 10,000, buying
- impact (bps) = (1 − VWAP / mid) × 10,000, selling
Both reduce to a positive "cost in bps" regardless of side: how much worse your average fill is than the price you saw right before clicking.
Capacity mode
Flip the question around: instead of "what's my impact at this size," ask "how large can I trade before impact exceeds my budget?" This calculator solves for that maximum notional via bisection. If the entire order book you supplied is still cheaper than your budget, the result is flagged as a lower bound: real market capacity could be higher, this calculator just can't see past what you gave it.
Where to go next
Once you know your real entry cost, size the position around your actual risk budget with the position size calculator, or check the full trade setup with Pre-Trade Check.
Use via API or MCP
This calculation is available as a deterministic API call for bots and AI agents.
What is "walking the book"?
Consuming order-book levels one at a time, best price first, until a target trade size is filled. Because each successive level is priced worse than the last, the volume-weighted average price (VWAP) you actually pay is worse than the top-of-book price for any size beyond what the best level alone can fill.
Why is impact measured from the mid price, not the price I clicked at?
The mid ((best bid + best ask) / 2) is the price a trader actually sees on their screen right before submitting an order - the fairest available reference point. Measuring against a price computed with hindsight (e.g. after the fill) would understate the real cost of the trade.
Why is impact always positive, whether I'm buying or selling?
It represents cost, not direction. Buying walks up the ask ladder (VWAP above mid); selling walks down the bid ladder (VWAP below mid). Both formulas flip sign so the result reads the same way: a positive number is always "how much worse than mid," regardless of side.
What does "capacity is a lower bound" mean?
In budget mode, if the entire order book you supplied is still cheaper than your impact budget, the calculator has run out of book to walk - it reports the full loaded depth as the answer, but flags it as a lower bound, since the real market likely has more depth beyond what you pasted in.
What units should size be in?
Base-asset units (e.g. BTC, not USD), matching how order books are normally displayed on an exchange. The calculator converts each level to notional internally (price times size) as it walks the book.