Formulas, assumptions
and known limits.
No black box. This page documents how RiskSized calculates position size, net outcomes and break-even so you can reproduce the result.
1. Inputs and risk budget
Account equity and cash are entered in USD. Risk can be a percentage of equity or a fixed dollar budget. Entry, stop, target and custom exit are quoted prices per share. Slippage is a single non-negative dollar amount applied adversely on both entry and exit.
Percentage risk budget = Equity × Risk % ÷ 100. A fixed budget is used directly. The planner rejects missing, non-finite, zero or negative required values, invalid fee rates and price directions that do not match the trade.
2. Execution-price assumptions
For a long, adjusted entry = Entry + Slippage and adjusted stop = Stop − Slippage. For a short, adjusted entry = Entry − Slippage and adjusted stop = Stop + Slippage. Target and custom exits also receive adverse slippage: down for a long, up for a short. Long exits cannot execute below zero in the model.
Long risk per share = Adjusted entry − Adjusted stop. For a short, subtract adjusted entry from adjusted stop. Entry and stop may not be equal; a long stop must be below entry and a short stop above it.
3. Three share-count constraints
Risk shares = Risk budget ÷ Risk per share.
Entry cost per share = Adjusted entry × (1 + Entry percentage fee ÷ 100). Available entry capital after fixed fee = Cash × Leverage − Entry fixed fee.
Buying-power shares = Available entry capital ÷ Entry cost per share.
Allocation shares = (Equity × Allocation % ÷ 100 − Entry fixed fee) ÷ Entry cost per share.
The raw final count is the smallest of those three. Negative capital candidates are clamped to zero. If fractional shares are disabled, the count is rounded down to an integer. If enabled, it is rounded down to six decimal places. A tiny floating-point tolerance prevents values such as 76.00000000001 from displaying inconsistent rounding; it does not round up to increase risk intentionally.
4. Net scenario cash flows
Entry notional = Shares × Adjusted entry. Entry fee = Entry fixed fee + Entry notional × Entry fee %. Exit fee = Exit fixed fee + Exit notional × Exit fee %.
Long net P&L = Shares × (Adjusted exit − Adjusted entry) − Entry fee − Exit fee.
Short net P&L = Shares × (Adjusted entry − Adjusted exit) − Entry fee − Exit fee.
Equity return = Net P&L ÷ Equity × 100. Gross P&L includes slippage but excludes commissions. The displayed gross R:R uses the raw entry, stop and target prices so it can be compared directly with the textbook ratio.
5. Reward, win rate and break-even
Net reward:risk = Net target profit ÷ |Net stop loss|. It is displayed only if the target is profitable and stop is a loss. Break-even win rate = |Net stop loss| ÷ (|Net stop loss| + Net target profit) × 100. This assumes repeated outcomes of exactly those sizes and is not a strategy forecast.
Long break-even exit = (Entry notional + Entry fee + Exit fixed fee) ÷ [Shares × (1 − Exit fee rate)] + Slippage. For a short, the denominator is Shares × (1 + Exit fee rate), and slippage is subtracted. A non-positive short break-even is shown as unavailable.
6. What the model excludes
- Taxes, dividends, corporate actions and currency conversion.
- Borrow fees, margin interest, broker-specific initial/maintenance requirements and forced liquidation.
- Real-time quotes, spreads, order-book depth, partial fills and market impact.
- Options, multi-leg orders, scale-ins, portfolio correlation and existing positions.
- Actual gap size or any guaranteed maximum loss.
Short and leveraged calculations use a deliberately simplified buying-power assumption. Confirm current requirements with your broker. Read stop-loss gap risk and the full disclaimer.
7. Reproducibility and testing
Share links contain the complete input set in URL-safe encoded JSON. CSV exports include inputs and results. Calculations run locally; no market or account data is required. The test suite covers long and short sizing, all three constraints, fixed and percentage fees, fractional rounding, break-even algebra, invalid inputs and net scenario calculations.
Version: MVP 0.1 · Last reviewed: November 1, 2026 · About RiskSized.