Position Size Calculator with Sleep-Well Mode

AlamToolKit.com

Position Size Calculator with Sleep-Well Mode

Enter your account, entry, stop-loss and the drawdown you can actually tolerate. Get one recommended size, see which limit bound it, and check whether a realistic losing streak fits your plan. Everything is calculated in your browser.

Account and risk limit

Use current equity if you already hold open positions. Must be greater than zero.
Percentage risk is normally applied to current equity.
Presets load the value per price move, step and precision — all editable in tab 2.

The trade

Long: stop below entry. Short: stop above entry. Wrong-side stops are blocked.
Planned entry, not live market data.
Pip size is taken from tab 2 (editable per instrument).

Risk per trade and drawdown tolerance

Fixed cash is typical for prop accounts with absolute loss limits.
Drag to watch the projected drawdown respond as the risk percentage changes.
Drag between 1% and 50%, or type an exact value in the field above. Your chosen stress threshold — not a promise the account can never exceed it.
Required for Sleep-Well Mode: a tolerance alone cannot define one unique size.

Worked example (Sleep-Well Mode)

Illustrative only. A 10,000 account, 1% standard risk, a 10% maximum drawdown and 8 consecutive full stop-outs, before trading costs.

\[ r_{\max}=1-(1-0.10)^{1/8}\approx 1.31\% \;\text{per trade} \]
  • Standard risk budget: 1% × 10,000 = 100.
  • Sleep-Well risk cap: 1.31% × 10,000 ≈ 130.84 — the largest per-trade risk that still fits the 10%/8-loss scenario.
  • Because 100 is lower than 130.84, the user’s own 1% limit is the binding constraint here.
  • Projected drawdown after 8 losses at 1% risk: 1 − 0.998 ≈ 7.73%, inside the 10% tolerance.
  • Raise the risk to 2% and the same streak projects 1 − 0.988 ≈ 14.9% — a breach, so Sleep-Well Mode would cut the size instead.

The live calculator repeats this arithmetic using your own inputs, and adds costs and broker rounding, so its figure can differ slightly from the round numbers above.

Contract specification

Every field is editable because brokers and exchanges use different specs. The preset only fills sensible defaults.

Stock: 1 per share. Forex lot: 100,000. Gold lot: 100. ES: 50. NQ: 20. Crypto: 1 per coin.
Used only to show the units-equivalent of your size.
Forex majors 0.0001, JPY pairs 0.01, ES/NQ 0.25, most gold feeds 0.1 or 0.01.
e.g. 1 share, 1 contract, 0.01 lot.
Size is always floored, never rounded up beyond your risk budget.

Trading costs

Leave at 1 when the instrument is quoted in your account currency.
Affects margin only — it does not make a position less risky at the stop.

Portfolio and target

Open risk + this trade must stay inside the cap. 0 disables the check.

Journal and plan

Optional. Appears in the copied summary and in saved setups.
Optional. Kept in your copy summary so the context travels with the numbers.

Sleep-Well Mode: the drawdown constraint

Your per-trade risk limit answers “how much do I risk on this one trade?” Sleep-Well Mode answers a second question: “how much can I risk per trade and still survive N full stop-outs without breaching the drawdown I can tolerate?” The calculator applies both limits and uses the lower one.

These two models give different answers. Mixing them is the most common position-sizing mistake.
Peak equity and floor modes are for prop-firm and peak-to-trough planning.
100% uses the full allowance. 75% leaves a deliberate margin — a choice, not a universal rule.
Separate from spread and slippage, so the same cost is not counted twice.
  • Scenario: test whether the account stays inside a 10% drawdown after 8 consecutive full stop-outs.
How the three position-size caps combine A flow diagram: account equity and risk percentage feed the risk-budget cap; drawdown tolerance and a stress scenario feed the Sleep-Well cap; leverage and contract size feed the margin cap. The smallest of the three caps sets the final position size. Risk per trade equity × risk % Drawdown tolerance + N losses (stress) Leverage & contract margin requirement Cap 1: risk budget budget ÷ loss per unit Cap 2: Sleep-Well down to a tradeable step Cap 3: margin buying-power limit MIN binding cap Final position size rounded DOWN to the broker step
Illustration: the smallest of the three caps determines the recommended size, and the tool always names the binding constraint. Educational diagram, not a data chart.

Preset stress scenarios

Planner presets, not recommendations. Tap one to set N, then adjust if you wish.

Recommended position size

—

—

    Key numbers

    Standard size vs Sleep-Well size

    Maximum position size permitted by each constraint. The shortest bar is the binding one.
    Each cap is the largest size that satisfies that rule on its own.
    ConstraintMax sizeCash risk at that sizeStatus

    Drawdown path under the stress scenario

    Projected equity after each consecutive full stop-out, against your drawdown tolerance line.
    Loss-by-loss projection using the compounding model (risk recalculated on remaining equity).
    Loss #Risk takenEquity afterCumulative drawdownVs tolerance

    Sensitivity: projected drawdown by risk % and losing streak

    Green = inside your tolerance, amber = within 15% of it, red = breaching it. Compounding model.
    Risk per trade3 losses5 losses8 losses10 losses15 losses

    Cost drag, recovery and extra checks

    Cost drag
    Recovery requirement
    Reward & break-even (if target entered)
    Prop-firm / daily-loss check

    Copy, share and export

    Nothing is uploaded. All calculations run in your browser; saved settings stay on this device only.

    Every formula used, in plain language

    Symbols: \(E\) = account equity, \(r\) = risk per trade as a decimal, \(P_e\) = entry, \(P_s\) = stop, \(D=|P_e-P_s|\), \(V\) = cash value of a 1.0 price move per 1 unit of size, \(c\) = per-unit round-trip cost in price units, \(F\) = fixed round-trip commission, \(f_{x}\) = quote-to-account currency rate, \(N\) = consecutive losses, \(DD\) = maximum acceptable drawdown.

    1. Cash risk budget

    \[ R_{\text{budget}} = E \times r \qquad\text{or}\qquad R_{\text{budget}} = \text{fixed cash amount} \]

    Your risk limit converted into money. Percentage risk normally uses current equity so that risk shrinks as the account shrinks.

    2. Loss per unit of size (all-in)

    \[ \begin{aligned} u &= \big(D + c\big)\times V \times f_{x} + \text{commission per unit}\\[2pt] c &= \big(\text{spread} + \text{slippage}\big)\times \text{pip size} \end{aligned} \]

    What one share, lot or contract actually loses when the stop is hit — stop distance plus spread plus slippage, converted to your account currency, plus per-unit commission.

    3. Standard (risk-based) position size

    \[ \begin{aligned} Q_{\text{raw}} &= \frac{R_{\text{budget}} - F}{u}\\[4pt] Q_{\text{risk}} &= \text{step}\times \left\lfloor \frac{Q_{\text{raw}}}{\text{step}} \right\rfloor \end{aligned} \]

    The fixed commission is deducted before dividing, then the result is always rounded down to the broker’s quantity step so the real risk never exceeds the plan.

    4. Sleep-Well maximum risk per trade

    \[ \begin{aligned} r_{\max} &= 1-(1-DD)^{1/N} &&\text{(compounding)}\\[4pt] r_{\max} &= \frac{DD}{N} &&\text{(simple, fixed cash risk)} \end{aligned} \]

    The largest per-trade risk that still keeps the account inside your tolerance after \(N\) consecutive full stop-outs. A 10% tolerance over 8 losses gives about 1.31% — not 1.25% — because percentage losses shrink the equity base.

    5. Sleep-Well size cap

    \[ \begin{aligned} R_{\text{drawdown}} &= r_{\max}\times E\\[2pt] R_{\text{allowed}} &= \min\big(R_{\text{budget}},\; R_{\text{drawdown}}\big)\\[2pt] R_{\text{usable}} &= R_{\text{allowed}}\times(1-b)\times \text{budget share}\\[4pt] Q_{\text{SW}} &= \text{step}\times\left\lfloor \frac{R_{\text{usable}}-F}{u\times \text{step}} \right\rfloor \end{aligned} \]

    \(b\) is the optional uncertainty buffer. The tool sizes against the lower of your own risk limit and the drawdown limit, then names which one bound the result.

    6. Projected drawdown at a given size

    \[ \begin{aligned} DD_{N} &= 1-\left(1-\frac{\text{planned risk}}{E}\right)^{N} &&\text{(compounding)}\\[4pt] DD_{N} &= \frac{N\times \text{planned risk}}{E} &&\text{(simple)} \end{aligned} \]

    7. Reverse solves

    \[ \begin{aligned} N_{\text{survivable}} &= \left\lfloor \frac{\ln(1-DD)}{\ln\!\big(1-\text{risk}\%\big)} \right\rfloor\\[4pt] \text{Gain to recover} &= \frac{DD}{1-DD}\\[4pt] P(N \text{ losses in a row}) &= (1-\text{win rate})^{N} \end{aligned} \]

    A 20% drawdown needs a 25% gain to recover. The streak-probability line assumes independent trades and a stable win rate — assumptions that often fail in real markets.

    8. Cost drag, margin and reward

    \[ \begin{aligned} \text{Margin} &= \frac{\text{position notional}}{\text{leverage}}\\[4pt] \text{Notional} &= Q \times \text{contract size}\times P_e \times f_{x}\\[4pt] \text{Cost drag} &= \frac{\text{spread}+\text{slippage}+\text{commission}}{R_{\text{budget}}}\\[4pt] R:R &= \frac{|P_{tp}-P_e|}{|P_e-P_s|} \end{aligned} \]

    Leverage changes the margin a position requires. It does not make the same quantity less risky at your stop.

    Frequently asked questions

    How do I calculate position size?

    Divide the money you are willing to lose on the trade by the loss per unit if the stop is hit. If you risk 1% of a 10,000 account (100) and your all-in loss per share is 5.40, the size is 100 ÷ 5.40 ≈ 18 shares, rounded down to your broker’s step. Include spread, slippage and commission in the loss per unit, or your real risk will be higher than planned.

    How many consecutive losses can my account withstand?

    With percentage risk the usable count is \(N=\lfloor \ln(1-DD) / \ln(1-\text{risk}\%) \rfloor\). At 1% risk and a 10% tolerance you can take roughly 10 full stop-outs before hitting the threshold, because each loss is taken from a smaller equity base. Use the stress scenario field to test any value you expect to face.

    What is a good risk percentage per trade?

    There is no universal number. It depends on your tolerance, your stop distance and how long a losing streak your strategy can realistically produce. This tool shows what each level implies for your drawdown rather than declaring a level correct.

    Why did Sleep-Well Mode reduce my size?

    Because your normal risk setting would breach your own tolerance after the number of losses you chose. The tool always shows both numbers and labels the binding constraint, so you can decide whether to accept a smaller size, widen your tolerance, or reconsider the stop.

    Does a bigger stop always mean a smaller position?

    Yes, at a fixed cash risk budget. Loss per unit rises with stop distance, so quantity falls. That is why the same lot size on trades with very different stops produces very different risk.

    Is the result a guarantee of safety?

    No. It is a scenario-based planning aid. Gaps over the stop, slippage, liquidity, fees and forced liquidation can all produce losses larger than the model, and a losing streak is only one path to a drawdown.

    Assumptions, accuracy and common mistakes

    Assumptions

    • Every loss equals the full planned stop-out risk. Real fills can be worse.
    • In compounding mode, risk is recalculated on the remaining equity after each loss.
    • Contract specifications, spread and slippage are the values you enter, not live broker data.
    • Open positions are treated as independent unless you enter their risk, and correlated trades can lose together.
    • Calculations are nominal; financing, swap and overnight interest are not modelled.

    Common mistakes this tool guards against

    • Entering a stop on the wrong side of the entry — blocked with a plain-language error.
    • Mixing the compounding and fixed-cash models — the toggle makes the choice explicit.
    • Ignoring fees on tight stops — the cost-drag panel shows what fees consume.
    • Rounding size up — the calculator only ever rounds down, and warns when no tradeable size fits.
    • Assuming leverage reduces risk — leverage is treated as a margin constraint, not a risk reducer.

    Accuracy note

    Arithmetic uses standard double-precision floating point and results are floored to your quantity step, so displayed risk may be marginally below the calculated maximum. Percentages are shown to two decimals; small rounding differences are expected. Re-verify any figure against your broker’s own contract specification before placing an order.

    Educational use only. This calculator is a scenario-based planning aid for position sizing and drawdown awareness. It is not investment advice, not a prediction, and not a safety guarantee.

    About this tool

    Built for AlamToolKit.com. One page, multiple functions: trade inputs, execution costs, the Sleep-Well drawdown constraint, worked formulas, charts and a screenshot-ready result summary. Single self-contained file — no external JavaScript libraries beyond MathJax for the formula typesetting.

    © AlamToolKit.com — position size calculator with Sleep-Well drawdown mode. Educational use only.

    Position Size Calculator with Sleep-Well Mode: Complete User Guide

    This guide walks through every result the AlamToolKit Position Size Calculator produces, explains the arithmetic behind it, defines each field with its unit, validates your inputs, and shows how to read the answer without over-trusting it. It mirrors the live calculator's four result areas: the recommended size, the key-number tiles, the cap comparison chart and table, the drawdown projection, the sensitivity grid, and the cost / reward / recovery panels.

    All formulas are shown in plain text so they render on any device. The live calculator uses the same arithmetic with double-precision floating point and floors each size to your broker's quantity step.

    What Is This Calculation Used For?

    A position size calculator answers one practical question: how many shares, lots, contracts or coins should I trade so that a stop-out costs only what I planned to lose? The Sleep-Well extension answers a second question on top of that: how much can I risk per trade and still survive N consecutive full stop-outs without breaching the drawdown I can tolerate?

    The calculator applies both limits, uses the lower one, and then names which constraint bound the result. That last part matters: a size that is limited by your own 1% risk rule is a different decision from a size limited by a drawdown scenario. The tool makes that distinction visible instead of hiding it inside a single number.

    Where traders and engineers apply this

    • Discretionary trading: size a stock, forex or futures trade so the cash loss at the stop matches a fixed risk budget.
    • Systematic / algorithmic trading: convert a percentage risk target into an integer quantity that respects contract multipliers and broker steps.
    • Prop-firm challenges: test whether a daily loss limit or a static / trailing maximum drawdown rule would be breached before the first target is reached.
    • Risk engineering and project finance: the same arithmetic sizes exposure when a stop-equivalent loss tolerance must be derived from a capital buffer.
    • Teaching and journaling: the copied summary and CSV export preserve the assumptions so a review later is honest.

    Key User Pain Points and How This Calculator Solves Them

    Pain: "My lot size is right but my risk is not."

    Two trades with the same lot size but very different stop distances carry very different risk. The calculator converts stop distance, spread, slippage and commission into a single all-in loss per unit, so the quantity comes out of real risk, not habit.

    Pain: "I round up and my risk silently rises."

    The tool always floors the raw size to your broker's quantity step. It never rounds up past the budget, and when no tradeable size fits it says so plainly instead of showing a misleading number.

    Pain: "I don't know which limit actually set my size."

    A binding-constraint label appears in the hero, the tiles and the cap table. You can see instantly whether your own risk rule, the Sleep-Well drawdown cap, margin or portfolio heat produced the final number.

    Pain: "I mix compounding and fixed-cash drawdown math."

    A single toggle makes the model explicit. Compounding uses 1 − (1 − DD)^(1/N); simple uses DD / N. The tool states which one produced the projection, so the two are never silently blended.

    Pain: "I forget that fees eat tight stops."

    The cost-drag panel shows spread, slippage and commission as a cash amount and as a percentage of the risk budget. When costs consume the whole budget, the tool refuses the trade and explains why.

    Pain: "Leverage feels like it reduces risk."

    Leverage is treated strictly as a margin constraint. The calculator warns when margin exceeds capital but never uses leverage to shrink the loss at the stop.

    Visual: How the Three Caps Combine Into One Position Size

    Three position-size caps combine into one recommended size Account equity and risk percentage feed the risk-budget cap. Drawdown tolerance and a stress scenario feed the Sleep-Well cap. Leverage and contract size feed the margin cap. The smallest of the three caps becomes the final position size, rounded down to the broker step. Risk per trade equity × risk % Drawdown tolerance + N losses (stress) Leverage & contract margin requirement Cap 1: risk budget budget ÷ loss per unit Cap 2: Sleep-Well drawdown-compatible size Cap 3: margin buying-power limit MIN binding cap Final position size rounded DOWN to the broker step
    Figure 1 — Three independent caps are computed; the smallest one becomes the final position size. The live calculator names which cap was binding so the user knows whether their own risk rule or the drawdown scenario limited the trade. Educational diagram, not a data chart.

    Step-by-Step Guide to Every Results Calculation

    The calculator produces six result areas. Each section below defines the field, its unit, the formula and the validation rule that protects it.

    Step 1 — Input Validation (Before Any Number Is Shown)

    The calculator refuses to produce a size until the inputs are internally consistent. These checks run first, and each failure appears as a plain-language error in the results panel.

    Table 1 — Validation rules and the error each one produces
    Input fieldRuleError shown when broken
    Account equityMust be > 0"Account equity must be greater than zero."
    Entry priceMust be > 0"Entry price must be greater than zero."
    Stop-loss price (long)Must be < entry"Long trades need a stop-loss BELOW the entry."
    Stop-loss price (short)Must be > entry"Short trades need a stop-loss ABOVE the entry."
    Stop distanceMust be > 0"Stop distance is zero — entry and stop-loss cannot be the same price."
    Loss per unitMust be > 0"Loss per unit works out to zero."
    Consecutive losses (N)Integer ≥ 1"Consecutive losses to withstand must be at least 1."
    Risk %0 < risk ≤ 100"Risk per trade cannot exceed 100% of the account."
    Max drawdown %0 < DD < 100"Maximum drawdown must be between 0% and 100%."
    Single-trade risk vs DDRisk ≤ total DD tolerance"Your single-trade risk is larger than your total drawdown tolerance."
    Value per price moveMust be > 0"Value per price move must be greater than zero."
    Pip / point sizeMust be > 0"Pip / point size must be greater than zero."
    Contract sizeMust be > 0"Contract size must be greater than zero."
    Costs vs risk budgetCosts < budget"Fees, spread and slippage consume the entire risk budget."
    Microcopy for a common mistake: If you typed the stop above the entry while the direction is "Long", the calculator will not silently flip the trade. It asks you to swap the prices or change the direction, because a wrong-side stop is the single most common sizing error.

    Step 2 — Cash Risk Budget

    Field: R_budget  |  Unit: account currency (USD, EUR, BDT, etc.).

    This is your risk limit converted into money. Percentage risk normally uses current equity so that risk shrinks as the account shrinks; fixed cash is used for prop accounts with absolute loss limits.

    R_budget = E × r (percentage mode) R_budget = fixed cash (cash mode) where: E = account equity (account currency) r = risk per trade as a decimal (e.g. 1% = 0.01)
    Worked example
    10,000.00 Equity (USD)
    1.00% Risk per trade
    100.00 R_budget (USD)

    If risk mode is "fixed cash", the percentage shown on the tiles is the cash amount expressed as a percentage of current equity, so the two views stay consistent.

    Step 3 — Loss Per Unit of Size (All-In)

    Field: u  |  Unit: account currency per 1 unit of size (per share, per lot, per contract).

    What one share, lot or contract actually loses when the stop is hit — stop distance plus spread plus slippage, converted to your account currency, plus per-unit commission. This is the number that makes tight-stop fee drag visible.

    c_price = (spread + slippage) × pip_size (price units) u = (D + c_price) × V × f_x + commission_per_unit where: D = |entry − stop| (price units) V = cash value of a 1.0 price move per 1 unit of size (quote currency) f_x = quote → account currency rate commission_per_unit = per-unit round-trip commission (account currency)
    Unit discipline matters here. For a US stock, V = 1 per share. For a forex standard lot, V = 100,000. For gold, V = 100. For ES futures, V = 50. If you enter V in the wrong unit, every result downstream is wrong by the same factor.
    Worked example (US stock)
    5.00 Stop distance D (price)
    0.05 Spread+slippage c_price
    5.05 u (USD per share)

    Step 4 — Standard Risk-Based Position Size

    Field: Q_risk  |  Unit: shares / lots / contracts / coins, floored to your broker's step.

    The fixed commission is deducted before dividing, then the result is always rounded down to the broker's quantity step so the real risk never exceeds the plan.

    Q_raw = (R_budget − fixed_commission) / u Q_risk = step × floor(Q_raw / step)
    Table 2 — How the step affects the final quantity
    Broker stepRaw sizeFloored sizeCash risk at floored size
    1 share19.8019 shares19 × 5.05 = 95.95
    0.01 lot0.19800.19 lots0.19 × 5.05 = 0.9595
    0.0001 coin0.19800.1980 coins0.1980 × 5.05 = 0.9999
    Microcopy for a common mistake: The calculator never rounds up. If the floored size is zero because the broker minimum is larger than the budget allows, you get "No valid tradeable size fits this risk limit" — not a false positive.

    Step 5 — Sleep-Well Maximum Risk Per Trade

    Field: r_max and R_drawdown  |  Unit: % of equity and account currency.

    The largest per-trade risk that still keeps the account inside your tolerance after N consecutive full stop-outs. A 10% tolerance over 8 losses gives about 1.31% — not 1.25% — because percentage losses shrink the equity base.

    Compounding model: r_max = 1 − (1 − DD)^(1/N) Simple model (fixed cash): r_max = DD / N Then: R_drawdown = r_max × E R_allowed = min(R_budget, R_drawdown) R_usable = R_allowed × (1 − buffer) × budget_share Q_SW = step × floor((R_usable − fixed_commission) / (u × step)) where: DD = maximum acceptable drawdown as a decimal N = consecutive losses to withstand buffer = extra uncertainty buffer as a decimal budget_share = share of the allowed risk budget (1.0 = 100%)
    Worked example (compounding, 10% DD, 8 losses)
    1.31% r_max per trade
    130.84 R_drawdown (USD)
    100.00 R_allowed (USD, lower)

    Because the standard budget of 100 is lower than 130.84, the user's own 1% limit is the binding constraint. Raise the risk to 2% and the same streak projects 14.9% — a breach — so Sleep-Well Mode would cut the size instead.

    Step 6 — Recommended Size and Binding Constraint

    Field: final_size and binding  |  Unit: shares / lots / contracts / coins, plus a text label.

    The smallest of the four caps — risk budget, Sleep-Well, margin and portfolio heat — becomes the final size. The calculator names which one bound it so you can make a deliberate choice about whether to accept the smaller size, widen the tolerance, or reconsider the stop.

    Table 3 — What the binding-constraint label means
    LabelMeaningWhat to do next
    Risk budgetYour own percentage or cash risk limit set the size.This is the normal case. No action needed unless you want to explore a smaller size.
    Sleep-Well drawdown capThe drawdown scenario allowed less risk than your own rule.Decide whether to accept the smaller size, widen the tolerance, or reduce N.
    Margin / buying powerLeverage or capital cannot support a larger position.Reduce size or raise available capital. Leverage is not a risk reducer.
    Portfolio heat capOpen risk plus this trade exceeds your total heat cap.Close or reduce an existing position first, or lower this trade's risk.

    Step 7 — Planned Risk and Projected Drawdown

    Fields: planned_risk (account currency), eff_risk_pct (% of equity), planned_DD (% of equity).

    Planned risk is the all-in cash loss if the floored size is stopped out: final_size × u + fixed_commission. Projected drawdown converts that into a percentage after N consecutive losses, using the model you selected.

    planned_risk = final_size × u + fixed_commission eff_risk_pct = planned_risk / E × 100 Compounding model: planned_DD = (1 − (1 − planned_risk / E)^N) × 100 Simple model: planned_DD = (N × planned_risk / E) × 100
    Why the two models differ: In compounding mode the risk amount shrinks after each loss because it is a percentage of a smaller equity base. In simple mode the cash risk stays fixed. The calculator's toggle makes the choice explicit so the two are never silently mixed.
    Worked example (US stock, 1% risk, 8 losses)
    95.95 planned_risk (USD)
    0.96% eff_risk_pct
    7.73% planned_DD (compounding)

    Step 8 — Survivable Losses and Recovery Requirement

    Fields: n_survive (integer losses) and gain_to_recover (%).

    The calculator solves the reverse question: given the effective risk per trade, how many consecutive full stop-outs fit inside the tolerance before the threshold is reached? It also shows the gain needed to climb back from the projected drawdown.

    n_survive = floor( ln(1 − DD) / ln(1 − eff_risk_pct) ) gain_to_recover = planned_DD / (1 − planned_DD) streak_probability = (1 − win_rate)^N
    Assumption to respect: the streak-probability line assumes independent trades and a stable win rate. Real markets often violate both. Treat the survivable-losses figure as a planning bound, not a promise that the streak will never happen.

    Step 9 — Cost Drag, Margin and Reward

    These panels show what the trade costs, what capital it ties up, and what it pays if the target is hit. Each field is defined below with its unit.

    Table 4 — Cost, margin and reward fields
    FieldUnitFormulaWhat to watch
    Cost dragAccount currency and % of R_budget(c_price × V × f_x + commission_per_unit) × final_size + fixed_commissionAbove 25% of the risk budget, the tool warns that costs are unusually high.
    Position notionalAccount currencyfinal_size × contract_size × entry × f_xCompare with account equity to gauge concentration.
    Estimated marginAccount currencynotional / leverageIf margin exceeds equity, the tool warns.
    Reward-to-risk (R:R)Ratio (unitless)|TP − entry| / |entry − stop|Only shown when the target is on the correct side of the entry.
    Break-even win rate%100 / (1 + R:R)The win rate at which the strategy is indifferent before costs.
    Net profit at targetAccount currencyfinal_size × |TP − entry| × V × f_x − costsAlready net of spread, slippage and commission.
    Microcopy for a common mistake: Leverage changes the margin a position requires. It does not make the same quantity less risky at your stop. The calculator never uses leverage to shrink the loss at the stop.

    Step 10 — Cap Table, Equity Chart and Sensitivity Grid

    The results panel also renders three visual aids: a bar chart of each cap, an equity line for the stress scenario, and a sensitivity grid of projected drawdown across risk levels and losing streaks. Each one is a direct visualisation of the formulas above — no separate model is used.

    Table 5 — Sensitivity grid: projected drawdown by risk per trade and losing streak (compounding model)
    Risk per trade3 losses5 losses8 losses10 losses15 losses
    0.25%0.75%1.24%1.98%2.47%3.69%
    0.50%1.49%2.47%3.93%4.89%7.23%
    1.00%2.97%4.90%7.73%9.56%13.97%
    1.50%4.44%7.28%11.40%14.03%20.26%
    2.00%5.88%9.61%14.92%18.29%26.14%
    3.00%8.73%14.13%21.62%26.26%36.63%

    Green = inside a 10% tolerance, amber = within 15% of it, red = breaching it. The grid uses the compounding model and a 10% tolerance as an illustration; the live calculator uses your own tolerance.

    Accuracy Note: What the Numbers Do and Do Not Promise

    The calculator uses standard double-precision floating point and floors each size to your quantity step, so displayed risk may be marginally below the calculated maximum. Percentages are shown to two decimals; small rounding differences are expected.

    Every loss is assumed to equal the full planned stop-out. In real markets, gaps over the stop, slippage, liquidity, fees and forced liquidation can all produce losses larger than the model. The projected drawdown is a scenario, not a forecast, and a losing streak is only one path to a drawdown.

    Re-verify any figure against your broker's own contract specification before placing an order. This calculator is an educational planning aid — not investment advice, not a prediction, and not a guarantee of safety.

    Real-World Usage Examples

    Example 1 — US stock, 1% risk, 8-loss stress test

    A 10,000 USD account trades a 100.00 stock with a 95.00 stop and a 112.00 target. Spread and slippage total 0.05, fixed commission is 2.00, per-share commission is 0.01. Loss per share is 5.05. The risk budget is 100.00, so the raw size is 19.40 shares; floored to 1 share steps, the recommended size is 19 shares. Planned risk is 95.95, which is 0.96% of equity. After 8 consecutive stop-outs at the compounding model, projected drawdown is 7.73% — inside the 10% tolerance. Reward-to-risk is 2.40R, break-even win rate is 29.41%.

    Example 2 — Forex major, 0.5% risk, 3-loss conservative plan

    A 25,000 USD account trades a USD-quoted major with a 20-pip stop. Value per standard lot is 100,000, pip size is 0.0001, so loss per lot is 20 × 0.0001 × 100,000 = 200.00 USD before costs. Risk budget is 125.00, raw size is 0.625 lots; floored to 0.01 lot steps, the recommended size is 0.62 lots. Planned risk is 124.00. With a 10% tolerance over 3 losses, the Sleep-Well cap is about 3.48% per trade, which is higher than the user's 0.5% rule — so the risk budget binds and the size stays at 0.62 lots.

    Example 3 — Futures ES, prop-firm daily loss limit

    A 50,000 USD prop account trades ES with a 4-point stop. Value per price move is 50, so loss per contract is 4 × 50 = 200.00 USD. A 2% risk budget gives 1,000.00 USD, raw size is 5 contracts; floored to 1-contract steps, the recommended size is 5 contracts. Planned risk is 1,000.00. The daily loss limit is 2% = 1,000.00, so this single trade uses 100% of it — the prop check flags this explicitly. The user can lower risk to 1% or widen the stop plan.

    Common Mistakes This Calculator Guards Against

    • Entering a stop on the wrong side of the entry — blocked with a plain-language error, not silently flipped.
    • Mixing compounding and fixed-cash models — a toggle makes the choice explicit and the result panel states which model was used.
    • Ignoring fees on tight stops — the cost-drag panel shows what fees consume as a percentage of the risk budget.
    • Rounding size up — the calculator only ever floors, and warns when no tradeable size fits.
    • Assuming leverage reduces risk — leverage is treated as a margin constraint, never as a risk reducer.
    • Forgetting open portfolio risk — the heat-cap check adds open risk to this trade and warns when the total exceeds the cap.

    Frequently Asked Questions

    How do I calculate position size?

    Divide the money you are willing to lose on the trade by the loss per unit if the stop is hit. If you risk 1% of a 10,000 account (100) and your all-in loss per share is 5.05, the size is 100 ÷ 5.05 ≈ 19 shares, rounded down to your broker's step. Include spread, slippage and commission in the loss per unit, or your real risk will be higher than planned.

    How many consecutive losses can my account withstand?

    With percentage risk the usable count is N = floor( ln(1 − DD) / ln(1 − risk%) ). At 1% risk and a 10% tolerance you can take roughly 10 full stop-outs before hitting the threshold, because each loss is taken from a smaller equity base. The calculator's stress-scenario field lets you test any N you expect to face.

    What is a good risk percentage per trade?

    There is no universal number. It depends on your tolerance, your stop distance and how long a losing streak your strategy can realistically produce. This tool shows what each level implies for your drawdown rather than declaring a level correct.

    Why did Sleep-Well Mode reduce my size?

    Because your normal risk setting would breach your own tolerance after the number of losses you chose. The tool always shows both numbers and labels the binding constraint, so you can decide whether to accept a smaller size, widen your tolerance, or reconsider the stop.

    Does a bigger stop always mean a smaller position?

    Yes, at a fixed cash risk budget. Loss per unit rises with stop distance, so quantity falls. That is why the same lot size on trades with very different stops produces very different risk.

    Is the result a guarantee of safety?

    No. It is a scenario-based planning aid. Gaps over the stop, slippage, liquidity, fees and forced liquidation can all produce losses larger than the model, and a losing streak is only one path to a drawdown.

    Why does the tool show two different sizes?

    One size is the standard risk-based size; the other is the Sleep-Well size. The recommended size is the smaller of the two, because the drawdown constraint should never be ignored just to trade a larger position. The cap table and bar chart make the comparison visible.

    What currency are the results shown in?

    The account currency you select. If the instrument is quoted in a different currency, the quote-to-account FX rate field converts the value per price move and the costs before sizing. Leave FX at 1 when the instrument is quoted in your account currency.

    About This Guide

    Published by AlamToolKit.com as the user-facing companion to the Position Size Calculator with Sleep-Well Mode. The guide mirrors the live calculator's arithmetic exactly, so the numbers you read here match the numbers you see there — apart from the deliberate rounding differences described in the accuracy note.

    Educational use only. This material is not investment advice, not a prediction, and not a safety guarantee. © AlamToolKit.com

    🧰

    The AlamToolKit Standard

    EVERY TOOL. ONE PLACE. ZERO CLUTTER.

    🧪

    Experience

    Every tool across Planning, Calculation, Writing, Organization, Finance, Utilities, Communication, Learning, Security, Health, Games, Digital Product, and Trading is designed, built, and stress-tested for real daily use before it reaches you.

    🎯

    Expertise

    From finance and trading calculators to study aids and habit trackers, every tool is documented with clear formulas, step-by-step logic, and real examples — so you always know how the numbers are produced.

    🏛️

    Authoritativeness

    Methods are grounded in publicly verifiable references — financial formulas, productivity frameworks, and educational best practices — never guesswork, across every planning, finance, and learning tool we ship.

    🛡️

    Trustworthiness

    Most planning, calculation, writing, and utility tools run entirely in your browser with no server-side data processing. Pricing, limitations, and privacy practices are stated plainly on every page.

    🔒 SSL Encrypted 📖 Sourced & Documented 🆓 Free Core, Forever 🏗️ Built In-House 📅 Updated Weekly 📈 Actively Growing

    Dual-Layer Security & Reliability

    Powered by Google Firebase + Client-Side Processing

    Your data, your control. Privacy-first architecture with cloud convenience. Every calculation runs locally in your browser — your sensitive data never leaves your device. Create an account to unlock secure cloud features that enhance your experience without compromising privacy.

    Local Processing

    No data transmission

    100% private

    Cross-Platform Sync

    Seamless across devices

    Firebase Cloud

    Secure Storage

    Enterprise-grade

    99.9% Uptime

    High reliability

    Auto-save

    Never lose data

    Validation

    Error prevention

    Real-time Processing

    Instant Results

    No waiting

    Accurate Results

    Real-time calculation

    Pro Tip: Install the APP for quick access and automatic cloud backup across all your devices when you create an account.

    About Me – Muhiuddin Alam

    Hello, I am Muhiuddin Alam, Founder and Chief Editor of AlamToolKit.com.

    I have built this platform to provide a comprehensive, free suite of digital tools for everyday life, productivity, and professional tasks. My goal is to simplify complex calculations, planning, and organization for everyone—from students and professionals to individuals managing their daily routines.

    At AlamToolKit.com, you'll find essential tools for time management, calculation, note-taking, finance, file management, and much more—all designed to be intuitive and efficient. I believe in creating practical digital solutions that empower users to work smarter.

    Explore our suite of calculators and tools:

    💌 Follow Me: LinkedIn | Google Knowledge Panel

    ❤ Want to connect or suggest a tool? Reach out at: [email protected]

    Simplify Your Day with Smart Tools

    Start using our free digital toolkit today and experience the difference in productivity, organization, and efficiency across all your daily tasks.

    About – AlamToolKit.com

    Productivity Tools • Calculators • Everyday Solutions

    AlamToolKit.com provides a comprehensive suite of free digital tools designed to simplify daily tasks, boost productivity, and solve practical problems for everyone.

    I am Muhiuddin Alam, Founder and Chief Editor of AlamToolKit.com. My mission is to create an accessible, all-in-one toolkit that helps people manage their time, finances, work, and daily life more efficiently.

    The platform features tools across multiple categories: planning & time management, calculation & conversion, writing & notes, organization & productivity, measurement tools, online utilities, and work solutions. Whether you need to calculate percentages, track expenses, manage tasks, convert units, or generate passwords—it's all here.

    Every tool is designed to be intuitive, fast, and free. With AlamToolKit.com, you can streamline your workflow, make informed decisions, and handle everyday challenges with confidence. It's your digital companion for personal efficiency and smarter living.

    ⚡ Trusted by User Worldwide
    ✅
    App Installed!
    Alam Toolkit is now in app mode
    📱 Install Alam Toolkit
    Follow these steps to install