Workspace / Research tools
Liquidity pools

Concentrated Liquidity Inventory Calculator

A concentrated-liquidity position changes its token mixture as price moves through a selected range. This calculator takes an arbitrary liquidity quantity L, current price, lower price, and upper price to show the associated token A and token B inventory. All prices use token B per token A in decimal-normalized human units. The browser-local model is useful for understanding position composition and comparing price scenarios. It does not import an on-chain liquidity integer, decode an NFT, add accrued fees, or reproduce contract rounding and tick-spacing rules.

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

Clamp price before calculating inventory

Let s be the square root of current price clamped between the lower and upper bounds. Let a and b be the square roots of those lower and upper bounds. Token A equals L × (b − s) ÷ (s × b). Token B equals L × (s − a). Below the range, the position is entirely A; above the range, it is entirely B. Require positive prices and upper greater than lower.

Inspect an in-range worked example

Consider hypothetical liquidity L = 100, a lower price of 1, an upper price of 4, and current price of 2.25 B per A. The square roots are 1, 2, and 1.5. Token A is 100 × 0.5 ÷ 3, or approximately 16.6667. Token B is 100 × 0.5, or 50. Valuing A at 2.25 B gives total inventory value of 87.5 B before fees.

Use normalized units and a consistent liquidity scale

The liquidity input is an abstract quantity calibrated to the human-price formulas. Raw contract liquidity and square-root prices use different numeric scales and may require token-decimal conversions before comparison. The formulas describe inventory only; separately accrued fees are excluded. Scaling L by two doubles both token balances without changing their proportions. At either boundary one token balance becomes zero, but the position still has value in the remaining token.

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