ComputeYard

The math, explained. Every formula shown, every result tested.

Stock Position Size Calculator

Size every stock trade by risk, not gut feel: enter your account, the percentage you'll risk per trade and your entry and stop, and get the exact number of whole shares to buy.

Educational estimate only, not investment, tax, or financial advice or a recommendation to buy or sell any security. Investing and options involve risk of loss; verify independently. By using this tool you accept our Terms and Disclaimer.

How it works

Fixed-fractional position sizing decides how much to buy from how much you're willing to lose. First it turns your risk per trade into cash: risk amount = account size × risk %. That's the most this trade may cost you if the stop is hit.

The distance from entry to stop is your risk per share. Dividing the cash risk budget by the per-share risk gives the number of shares, floored to whole units, so the realised loss at the stop is always at or below your budget. From the share count it derives the position value, what fraction of the account that ties up, and the actual cash at risk if you're stopped out.

Sizing by a fixed risk fraction keeps any single loss small, which is what keeps the break-even gain after a loss realistic. To set the risk fraction from your edge, see the Kelly criterion calculator; to judge whole-portfolio risk, the Sharpe ratio and drawdown calculator.

Worked example

Account $25,000, risking 1% per trade, entry $50.00, stop $48.00:

  • Risk budget = $25,000 × 1% = $250.00.
  • Risk per share = |$50.00 − $48.00| = $2.00.
  • Shares = floor($250 ÷ $2) = 125 shares.
  • Position value = 125 × $50 = $6,250.00, that's 25% of the account.
  • Actual risk if stopped = 125 × $2 = $250.00 (exactly the budget here, since 250 ÷ 2 is whole).

The formula

risk_amount    = account_size × risk_per_trade_pct
per_share_risk = |entry_price − stop_price|
shares         = floor(risk_amount ÷ per_share_risk)   (whole shares)
position_value = shares × entry_price
% of account   = position_value ÷ account_size
actual_risk    = shares × per_share_risk   (≤ risk_amount)

FAQ

How much should I risk per trade?
Many traders cap risk at 1–2% of account equity per trade, so a losing streak can't blow up the account. This is a sizing tool, not advice. Pick a level that fits your plan.
Why are shares rounded down?
Whole shares only: flooring means the loss at your stop is always at or below your risk budget. The small leftover is the bit a fractional share would have used.
Does it account for commissions or slippage?
No. It sizes off the clean entry-to-stop distance. Fees and slippage widen your real loss slightly, so treat the result as the maximum size, not a floor.

Related calculators

All calculators →

Embed this calculator on your site (free)

Paste this HTML where you want the calculator to appear. It loads live from ComputeYard, stays up to date automatically, and includes a link back.