Skip to main content

    Calculation method

    How MoonMath calculates position size

    Position Size & Risk Budget — How large should my position be if I only risk X% of my portfolio?

    The formula

    Size is the risk budget divided by the per-token loss at the stop plus the round-trip fee on both prices, so the maximum loss reconciles exactly to the budget. Break-even adjusts the entry by the fee on both sides.

    What it reads

    • Portfolio value and the maximum share of it to risk
    • Entry price and stop price
    • The fee percentage per side
    • Optionally a take-profit price, for the reward ratio

    What it assumes

    • Fees are symmetric per side and sizing is fee-inclusive, so the maximum loss matches the risk budget exactly
    • Slippage and price impact are ignored: fills are assumed at exactly the entry and stop prices
    • The stop is assumed to fill precisely, with no gapping or partial fill
    • Spot only — no margin, borrow cost or funding is modelled

    What this does not establish

    • The maximum loss is not a floor: it holds only if the stop fills at the stop price
    • It does not establish affordability — a size exceeding the portfolio is flagged but still returned
    • The reward ratio compares two assumed price levels and says nothing about how likely either is
    • Direction is inferred from where the stop sits relative to the entry, not stated

    Run it

    Size a crypto position from portfolio value, maximum risk and stop distance. The calculator includes fees in maximum loss and can compare the planned reward with the amount at risk.

    Open the Position Size calculator

    How the market itself works

    This page describes MoonMath's arithmetic. The mechanics section describes the market: how an order book forms a price, why order-book depth is not the same thing as pool liquidity, and what a public book does and does not let you observe.

    Read the market mechanics