Free · Client-side · No signup · No data leaves your browser

The Trader's Risk Toolkit

Six calculators most traders skip, and most losing traders never learn: position sizing, R-multiples, expectancy, a Monte Carlo risk-of-ruin simulator, Kelly fraction, and break-even win rate. Every formula is shown in the open below its result — check the math yourself, don't take it on faith.

Sizing

Position size calculator

How many shares (or contracts, treated as 1:1 units here) can you buy without risking more than a fixed percent of your account if your stop gets hit. Works for longs and shorts — the calculator infers direction from where you put the stop. Where that stop actually belongs is a separate question from the sizing math — see the stop-loss placement guide for structure-based stops versus arbitrary percentage stops.

Stop below entry = long. Stop above entry = short. Direction is detected automatically.

Result

Shares/contracts
Dollar risk
Position notional
% of account (notional)

What it computes

The number of shares that caps your loss at a fixed percent of the account if the stop is filled at your stop price. It answers "how big", never "should I take this trade" — the entry and the stop are inputs you supply, and the math is only as good as they are.

The formula

risk_per_share = |entry − stop| dollar_risk = equity × risk % position_size = floor(dollar_risk / risk_per_share) notional = position_size × entry

Worked example

equity $25,000 · risk 1% · entry $48.20 · stop $46.10 risk_per_share = 48.20 − 46.10 = $2.10 dollar_risk = 25,000 × 0.01 = $250.00 position_size = floor(250 / 2.10) = 119 shares actual risk = 119 × 2.10 = $249.90 notional = 119 × 48.20 = $5,735.80 (22.9% of equity)

When this number misleads you

It assumes your stop fills at your stop. Gaps and halts break that assumption, and they break it in the direction that hurts. If the same stock opens at $43.00 after an earnings miss, those 119 shares lose $5.20 each — $618.80, or 2.48R, which is 2.5% of the account instead of the 1% you sized for. Illiquid names, pre-market fills and limit-down opens do the same thing. A position sizer sets an intention, not a guarantee, which is why notional concentration (22.9% here) still matters even when the dollar risk looks small.

Grading trades

R-multiple calculator

An R-multiple measures a trade's result as a multiple of what you risked, so a $40 win on a $20-risk trade and a $400 win on a $200-risk trade are both "+2R" — comparable regardless of size. One formula handles longs and shorts identically.

Single trade
Batch mode (optional)

Result

Single trade R
Batch total R
Batch average R
Batch win rate
R = (exit − entry) / (entry − stop) This single formula is sign-correct for both directions: long (stop < entry): profitable exit > entry → positive R short (stop > entry): profitable exit < entry → positive R

What it computes

A trade's profit or loss expressed in units of the risk you took, so trades of different sizes, prices and account balances can sit in the same column of a journal. 1R is the entry-to-stop distance; a full stop-out is −1R by definition.

The formula

R = (exit − entry) / (entry − stop) 1R (dollars) = position_size × |entry − stop|

Worked example

entry $48.20 · stop $46.10 · exit $51.75 · 119 shares R = (51.75 − 48.20) / (48.20 − 46.10) = 3.55 / 2.10 = +1.69R dollars = 119 × 3.55 = $422.45 check = 422.45 / 249.90 risked = 1.69×

When this number misleads you

R normalises by your stop, so a sloppy stop flatters the record. Take the identical $3.55 move with the stop parked at $44.00 instead: the risk unit becomes $4.20, position size drops to 59 shares, and the same idea logs +0.85R and $209.45 — half the result for the same chart. Worse, every full stop-out is exactly −1R whether the stop sat 4% or 13% away, so a page of −1Rs will never tell you your stops are too wide. R compares outcomes; it does not audit stop placement, and it says nothing about how long capital was tied up.

The number that actually matters

Expectancy calculator

Expectancy is your average result per trade, in R, given your actual win rate and the size of typical wins and losses. A positive expectancy is necessary for a system to work over time — it is not sufficient, and it says nothing about how bad a losing streak can feel along the way (that's what the simulator below is for).

Result

Expectancy per trade (R)
Expectancy = (win rate × avg win) − ((1 − win rate) × avg loss)
What this does and doesn't tell you: a system with 45% wins, 2R average win, 1R average loss has expectancy +0.35R/trade — but with a small sample (say, 30–60 trades) the confidence interval around that number is wide. A run of 40 trades from a true +0.35R system can easily show a negative result by chance alone, and a run of 40 trades from a break-even or slightly negative system can show a strong positive result. Expectancy from under ~100 trades is a hypothesis, not a fact — see the honesty section below for a real example of this happening to me.

What it computes

The average R you should expect per trade over a large sample, given a win rate and the typical size of a win and a loss. It is the one number that decides whether a system makes money at all — win rate on its own decides nothing.

The formula

E = (p × avg_win_R) − ((1 − p) × avg_loss_R) where p = win rate as a decimal, avg_loss_R entered as a positive number

Worked example

win rate 42% · avg win 2.10R · avg loss 1.00R E = 0.42 × 2.10 − 0.58 × 1.00 = 0.882 − 0.580 = +0.302R per trade at $250 of risk per trade -> $75.50 expected per trade -> $7,550 expected per 100 trades

When this number misleads you

Expectancy over 30 trades is noise, not an edge. With those same inputs a single trade has a standard deviation of 1.53R, so even if +0.302R is the true expectancy, the average of a random 30-trade sample lands anywhere between roughly −0.25R and +0.85R 95% of the time — an interval that comfortably contains zero. You need around 500 trades before that interval tightens to about [+0.17R, +0.44R]. It also assumes your average win and average loss are stable, which they are not: one outsized winner can carry the whole figure, and a regime change can reset it without warning.

The lesson expectancy alone won't teach you

Risk of ruin calculator (Monte Carlo)

Positive expectancy over many trades still produces a wide spread of possible outcomes, because trade order and win/loss sequencing are random. This runs 2,000 independent simulated paths of your system and shows the actual distribution of outcomes and drawdowns you could experience, not just the average.

Result

Median final equity (×)
10th pct. final equity (×)
Median max drawdown
P(drawdown ≥ threshold)
Distribution of final equity multiple across 2,000 simulated paths.
Per trade: equity ← equity × (1 + risk% × R), where R = +avgWin with prob. p, −avgLoss with prob. (1−p), drawn independently each trade. Max drawdown per path = max over time of (running peak − equity) / running peak. Assumptions: independent draws (no streak correlation, no regime effects), fixed fractional risk (position size recalculated off current equity each trade, not a fixed dollar amount), no costs/slippage.

What it computes

2,000 independent random orderings of the same system, so you see the whole distribution of outcomes instead of the average one: median and 10th-percentile final equity, the typical worst drawdown, and how often a drawdown of your chosen size shows up at all.

The formula

equity(t) = equity(t−1) × (1 + risk% × R(t)) R(t) = +avg_win with probability p −avg_loss with probability 1 − p (drawn independently) max_drawdown = max over t of (running_peak − equity) / running_peak

Worked example

win rate 42% -> probability of a loss = 0.58 15 straight losses at 1% risk: 0.99^15 = 0.8601 -> −14.0% equity the same streak at 3% risk: 0.97^15 = 0.6333 -> −36.7% equity P(at least one 10-loss streak in 200 trades) = 29.9% P(at least one 15-loss streak in 200 trades) = 2.2% Tripling risk per trade did not triple the damage — it turned a recoverable dip into a hole that needs +58% just to get back to flat.

When this number misleads you

The simulation assumes trades are independent and identically distributed. Real drawdowns cluster: the same market condition that kills one trade kills the next four, correlated names count as one bet, and a broken thesis gets repeated before it gets abandoned. That makes real drawdowns arrive deeper and faster than this histogram implies. It also charges no commissions, no slippage and no gap overshoot, and it quietly assumes you keep executing identically at the bottom of a 30% drawdown — which is the assumption that actually fails first.

The theoretical ceiling — do not use it directly

Kelly criterion calculator

The Kelly criterion gives the risk fraction that maximizes long-run geometric growth if your win rate and payoff ratio are known exactly. In real trading they're estimates, not known constants, and full Kelly produces brutal drawdowns even when the inputs are correct. Fractional Kelly (typically ¼–½ Kelly) is the practical standard for this reason.

Result

Full Kelly
½ Kelly
¼ Kelly
b = avg win / avg loss (payoff ratio) f* = p − (1 − p) / b = (p·b − (1 − p)) / b
Full Kelly is not a recommendation, it's a ceiling. It assumes your win rate and payoff ratio are exact and constant, which they never are in live trading — real edges decay and get mis-estimated from small samples. Even with correct inputs, full Kelly's growth-optimal path still carries 50%+ drawdowns as a normal event. Most professional sizing lands at ¼–½ Kelly specifically to trade some growth rate for a survivable ride. Full derivation and a worked example: the Kelly criterion guide.

What it computes

The fraction of equity to risk per trade that maximises the long-run geometric growth rate, assuming your win rate and payoff ratio are known exactly and stay constant. It is a mathematical ceiling, not a position-sizing recommendation.

The formula

b = avg_win / avg_loss (payoff ratio) f* = p − (1 − p) / b = (p·b − (1 − p)) / b fractional Kelly = f* × 0.5 (half) or f* × 0.25 (quarter)

Worked example

win rate 42% · avg win 2.10R · avg loss 1.00R · equity $25,000 b = 2.10 / 1.00 = 2.10 f* = 0.42 − 0.58 / 2.10 = 0.42 − 0.2762 = 0.1438 -> 14.4% per trade full Kelly = 14.4% of $25,000 = $3,595 risked per trade quarter Kelly = 3.6% of $25,000 = $899 risked per trade 1% of equity = $250 risked per trade

When this number misleads you

Kelly assumes you know your true win rate and payoff ratio, and you almost never do — you have an estimate from a small sample, and the estimate is usually flattering. Overstate that 42% win rate by five points and f* jumps from 14.4% to 21.8%, a 51% larger bet placed on a mistake. Over-betting past f* lowers your growth rate and raises your risk of ruin at the same time, so the error is not symmetric. Even with perfect inputs, full Kelly treats a 50%-plus drawdown as an ordinary event, which is why a quarter to a half of Kelly is the working standard and 1–2% of equity per trade is where most surviving retail traders actually sit.

The bar you need to clear

Break-even win rate calculator

Given a reward:risk ratio, this is the win rate at which expectancy is exactly zero — the minimum you need to clear before a system is worth trading at all.

Result

Required win rate
break-even win rate = 1 / (1 + reward:risk) e.g. at a 2:1 reward:risk, you only need to win 33.3% of the time to break even.

What it computes

The win rate at which expectancy is exactly zero for a given reward-to-risk ratio — the bar a system has to clear before it is worth trading at all. Anything below it loses money no matter how good the trades feel.

The formula

break_even_win_rate = 1 / (1 + reward:risk) derivation: set p × RR − (1 − p) × 1 = 0 -> p = 1 / (1 + RR)

Worked example

reward:risk 2.10 : 1 (target $52.61 from entry $48.20, stop $46.10) p = 1 / (1 + 2.10) = 1 / 3.10 = 0.3226 -> 32.3% with costs of $0.07 per share round trip on a $2.10 risk unit: cost in R = 0.07 / 2.10 = 0.033R net win = 2.10 − 0.033 = 2.067R net loss = 1.00 + 0.033 = 1.033R net R:R = 2.067 / 1.033 = 2.00 p = 1 / 3.00 = 33.3%

When this number misleads you

The clean formula is gross of everything that actually happens. Commissions, a penny or two of slippage on each side, and financing on held positions all shift the bar upward — in the example above a routine $0.07 per share permanently adds a full point of required win rate before you earn a dollar. Partial fills are worse: a target that fills half your size still books a full loss when it fails. And it assumes a single fixed reward-to-risk, whereas real exits scale out, trail, and get cut early, so your realised ratio is almost always lower than the one you planned.

Why I built this the way I did

I tried to kill my own backtested edge, and mostly succeeded

I run a swing-setup screener that flagged an anchored-VWAP reclaim pattern. The first backtest produced a headline expectancy that looked like a real edge — but it came from eight correlated large-cap tech and index names I had picked with hindsight, over one arbitrary window alignment. So instead of trusting it, I re-tested it adversarially. The explicit goal was to try to kill the result, not to confirm it. That headline number did not survive, so it has been retired rather than quoted here.

Sliding the backtest's arbitrary 126-bar window grid across 21 alignments on those same 8 names, the reproducible expectancy had a median of +0.004R, ranging from −0.045R to +0.287R. The original headline sat near the lucky end of a distribution that was, at its center, indistinguishable from zero. Expanding to a 129-symbol, 10-year universe did find a statistically significant expectancy of +0.117R over 4,933 trades (block-bootstrap 95% CI [+0.057, +0.174]). But when I benchmarked the AVWAP-reclaim signal against risk-matched random entries using the identical stop and target, the random entries alone captured +0.086R of that — just long-term market drift. The signal's own incremental contribution came out to +0.030R per trade, with a 95% confidence interval of [−0.014, +0.077] — a result that does not clear statistical significance, and one that ordinary trading costs (5–10 bps round-trip) would mostly or entirely consume.

Stated plainly: this is not a validated edge. A confidence interval that crosses zero means the honest reading is "I cannot distinguish this from nothing," not "it is small but positive."

Verdict: marginal. Trade it small, sized at a fraction of normal risk, or not at all.

That's the exact experience this toolkit is built to prevent you from having to learn the hard way: a good-looking backtest number, a small sample, and a plausible story are not the same thing as a validated edge. Position size like your edge might be much smaller than your backtest says, because it usually is. Logging every trade in R, the way a proper trading journal does, is what surfaces a fake edge before it costs real money.

Full write-up with method, every benchmark, and the correlation-adjusted statistics: reports/robustness-2026-07.md in the swing-screener repo.

Go deeper

These six calculators are chapter 4 of the course

The Swing Trading Operating System walks through position sizing and expectancy math, the anchored-VWAP setup above (including how to stress-test it yourself), chart-pattern and options-overlay modules, and the weekly routine that ties it together — 8 illustrated modules, no signals or return promises, just the process.

See the course — $59

Risk disclosure

Trading involves substantial risk of loss

Educational content only — nothing on this page is financial advice, a recommendation, or a solicitation to trade, and no calculator here predicts or promises any return. Trading involves substantial risk of loss, including total loss of principal, and most retail traders lose money.

Risk math does not remove risk. A stop can gap through your price, a position can be halted, and a realised loss can exceed the figure any calculator on this page shows. The simulator assumes trades are independent; real drawdowns cluster and arrive worse. Past or backtested performance, including the AVWAP example above, does not indicate future results.

Verify every formula independently before relying on it with real capital, and never risk money you cannot afford to lose.

Legal: Refunds · Terms · Privacy


FAQ

Common questions

Longer version, with every formula worked out: R-multiple & expectancy, explained →

How do I calculate position size for a trade?

Divide the dollars you are willing to lose by the per-share risk. Dollars at risk = account size x risk percent (1% of a $25,000 account is $250). Per-share risk = entry price minus stop price. Position size = dollars at risk / per-share risk. The free position sizer at https://yusuf-gadelrab.github.io/risk-tools.html does this in the browser and prints the formula under the result.

What is an R-multiple?

An R-multiple expresses a trade's outcome in units of the risk you took. 1R is the distance from entry to stop. A trade that makes twice what you risked is +2R; one that hits the stop is -1R. Measuring in R makes trades comparable across position sizes and account sizes.

What is expectancy in trading?

Expectancy is the average R you earn per trade: (win rate x average win in R) minus (loss rate x average loss in R). A positive expectancy means the strategy makes money over a large sample; anything at or below zero does not, no matter how good the win rate looks.

What win rate do I need to break even?

Break-even win rate = 1 / (1 + reward-to-risk). At 2R reward per 1R risk you need to win 33.3% of the time; at 1R you need 50%; at 3R you need 25%. The break-even calculator on the risk toolkit page computes it for any reward-to-risk ratio.

What is risk of ruin?

Risk of ruin is the probability that a run of losses drains your account to an unrecoverable level, given your win rate, reward-to-risk, and risk per trade. The toolkit estimates it with a Monte Carlo simulation so you can see how much a 1% risk per trade differs from a 3% risk per trade.

Is the Kelly criterion safe for retail traders?

Not at full size. Kelly assumes you know your true win rate and payoff ratio exactly, and a retail trader is estimating both from a small sample that usually flatters the strategy. At a 42% win rate with 2.10R wins and 1R losses, full Kelly is 14.4% of equity per trade — $3,595 on a $25,000 account, against $250 at a conventional 1% risk. Overstating that win rate by five points pushes full Kelly to 21.8%, a 51% larger bet placed on a mistake. Even with perfect inputs, full Kelly treats a drawdown over 50% as an ordinary event, so a quarter to a half of Kelly is the working standard and 1-2% of equity per trade is where most surviving retail traders sit.

How many trades do I need before my expectancy means anything?

Hundreds, not dozens. At a 42% win rate with 2.10R wins and 1R losses, a single trade has a standard deviation of 1.53R, so even if the true expectancy is +0.302R, the average of a random 30-trade sample lands anywhere between roughly -0.25R and +0.85R 95% of the time — an interval that contains zero. My own reference point is an anchored-VWAP setup tested over 4,933 trades: it produced +0.117R over 4,933 trades with a 95% confidence interval of [+0.057R, +0.174R], but a risk-matched random entry already captured +0.086R of that, leaving the signal's own contribution at +0.030R with a confidence interval crossing zero. That is not a validated edge — and it took nearly 5,000 trades to establish that.

Are these calculators free, and is my data private?

Yes. All six calculators are free with no signup. The page is static and runs entirely in your browser — nothing is sent to a server and nothing is stored off your device. They are educational tools, not financial advice.