Workspace / Research tools
Execution research

Order Book Entropy Calculator

A book with ten price levels can still concentrate nearly all displayed quantity in one level. Entropy describes that distribution more clearly than a level count alone. This calculator applies Shannon entropy separately to the quantities supplied for each side of an order book. It helps compare concentration across consistently sampled snapshots. The measure is deliberately about quantity shares: it does not infer whether a spread is competitive, whether orders are genuine, or whether enough liquidity is near your intended price.

Enable JavaScript to edit assumptions, calculate and compare a baseline locally. The formula and methodology below remain available without JavaScript.

Convert quantities into a probability distribution

For one side with n valid levels and positive quantities qᵢ, define pᵢ = qᵢ/Σq. Shannon entropy is H = −Σpᵢ ln(pᵢ), using natural logarithms. Normalized entropy is H/ln(n) when n exceeds one, and effective levels equal exp(H). A one-level side has H = 0 and one effective level; this tool defines its normalized entropy as zero because ln(1) would otherwise create a zero denominator. Price fields identify the levels but do not weight this quantity-only statistic.

Compare even and concentrated quantities

Two levels with quantities five and five have shares 0.5 and 0.5. Entropy is ln(2), approximately 0.6931, normalized entropy is 1, and effective levels are 2. Quantities nine and one instead produce H of approximately 0.3251, normalized entropy of 0.4690, and about 1.384 effective levels. Both books have ten total units and two visible levels, yet their concentration differs substantially.

Keep depth and aggregation comparable

Adding very distant levels or changing the venue's price aggregation can alter entropy without improving executable liquidity near the midpoint. Compare the same number of levels or a consistent price band, and keep bids and asks separate. Duplicate aggregated prices can falsely create extra apparent levels unless validated before calculation. Entropy contains no direction signal by itself, and a high value is not a guarantee of low slippage. Inspect prices, total size, spread, and snapshot timing alongside concentration.

Primary documentation

Your research workspace

Save selected inputs and research notes explicitly in this browser. Compare assumptions and restore a saved setup without submitting a trade. JavaScript enables the controls.

Find a tool or research page