trading

Position Sizing: The Formula Every Trader Must Know Before Entering a Trade

Most traders blow up their accounts not because they pick bad stocks — but because they size positions wrong. Here's the exact position sizing formula that protects your capital.

April 4, 2026·8 min read·
#trading#risk management#position sizing#stocks#crypto#forex

New traders obsess over entry points. Experienced traders obsess over position sizing.

The hard truth: you can have a 40% win rate and still be profitable — if your position sizing is correct. You can have a 70% win rate and still blow up your account — if it's wrong. Position sizing is not a detail. It's the engine.

Here's the framework I use after 5+ years of active trading across stocks, crypto, and forex.


Why Most Traders Get This Wrong

The typical beginner approach: "I have $10,000, I'll buy $2,000 worth of this stock."

This is arbitrary. It doesn't account for:

  • How far away your stop-loss is
  • How volatile the asset is
  • How this position correlates with others in your portfolio
  • How much of your account you can afford to lose on this trade

Position sizing without a framework is just gambling with extra steps.


The Core Principle: Risk Per Trade

The foundation of every position sizing method is answering one question first:

How much am I willing to lose if this trade is completely wrong?

Professional traders risk 1-2% of total account equity per trade. This is not arbitrary — it's math.

If you risk 2% per trade and you hit a 10-trade losing streak (it happens), you've lost 18.3% of your account. Painful, but recoverable.

If you risk 10% per trade and hit that same streak, you've lost 65% of your account. That requires a 186% gain just to break even. Almost impossible.

The 2% Rule:

  • $10,000 account → max $200 risk per trade
  • $50,000 account → max $1,000 risk per trade
  • $100,000 account → max $2,000 risk per trade

Method 1: Fixed Fractional Position Sizing

The most practical method for most traders.

Formula:

Position Size = (Account Equity × Risk %) / (Entry Price - Stop Loss Price)

Example — Stock trade:

  • Account: $10,000
  • Risk per trade: 2% = $200
  • Stock: BBCA at Rp 9,500
  • Stop loss: Rp 9,000 (Rp 500 below entry)
Position Size = $200 / $0.50 equivalent = 400 shares

If BBCA hits your stop at Rp 9,000, you lose exactly $200 (2% of account). No more.

Example — Crypto trade:

  • Account: $5,000
  • Risk per trade: 1% = $50
  • Bitcoin: $65,000
  • Stop loss: $63,000 (distance: $2,000)
Position Size = $50 / $2,000 = 0.025 BTC

Position value: 0.025 × $65,000 = $1,625 (32.5% of account)

Notice: even though you're committing 32% of your account, you're only risking 1% because your stop is defined. This is the core insight.


Method 2: ATR-Based Position Sizing

Average True Range (ATR) measures an asset's actual daily volatility. Using ATR for stops instead of arbitrary price levels gives you stops that breathe with the market.

Formula:

Stop Distance = ATR(14) × Multiplier (typically 1.5x–2.5x)
Position Size = (Account × Risk %) / Stop Distance

Example:

  • Account: $10,000, Risk: 2% = $200
  • Stock trading at $50, ATR(14) = $1.20
  • Stop distance: $1.20 × 2.0 = $2.40
Position Size = $200 / $2.40 = 83 shares
Position value = 83 × $50 = $4,150

Why ATR-based stops are better:

A $50 stock with ATR of $3.00 is more volatile than a $50 stock with ATR of $0.50. A fixed $2 stop on the volatile stock will get hit by normal daily noise. ATR-based stops filter out the noise.

This is especially important in crypto, where 5-10% daily swings are normal.

# Quick ATR calculation in Python
import pandas as pd
import numpy as np

def calculate_atr(df, period=14):
    """df must have 'high', 'low', 'close' columns"""
    high_low = df['high'] - df['low']
    high_close = abs(df['high'] - df['close'].shift())
    low_close = abs(df['low'] - df['close'].shift())
    
    true_range = pd.concat([high_low, high_close, low_close], axis=1).max(axis=1)
    atr = true_range.rolling(window=period).mean()
    return atr

def position_size_atr(account, risk_pct, entry_price, atr, multiplier=2.0):
    risk_amount = account * (risk_pct / 100)
    stop_distance = atr * multiplier
    shares = risk_amount / stop_distance
    position_value = shares * entry_price
    
    return {
        'shares': round(shares),
        'stop_price': round(entry_price - stop_distance, 2),
        'position_value': round(position_value, 2),
        'risk_amount': risk_amount
    }

# Example
result = position_size_atr(
    account=10000,
    risk_pct=2,
    entry_price=50.00,
    atr=1.20,
    multiplier=2.0
)
print(result)
# {'shares': 83, 'stop_price': 47.6, 'position_value': 4150.0, 'risk_amount': 200}

Method 3: The Kelly Criterion

Kelly gives you the mathematically optimal fraction of capital to bet, based on your historical win rate and reward/risk ratio.

Formula:

Kelly % = Win Rate - (Loss Rate / Reward:Risk Ratio)

Example:

  • Win rate: 55% (0.55)
  • Average win: $300, Average loss: $200 → R/R ratio = 1.5
  • Loss rate: 45% (0.45)
Kelly % = 0.55 - (0.45 / 1.5)
Kelly % = 0.55 - 0.30
Kelly % = 25%

Kelly says bet 25% of your account on this trade.

The problem: Full Kelly is extremely aggressive. A bad streak can destroy 50%+ of your account. In practice, traders use Half Kelly (12.5%) or Quarter Kelly (6.25%) to smooth the equity curve.

When Kelly is useful: As a sanity check. If Kelly says 2% and you were planning 10%, you're over-leveraged. If it says 25%, use Half Kelly at most.

Kelly requires accurate statistics. You need at least 50-100 trades of historical data to trust your win rate. Don't use Kelly based on 10 trades.


Risk/Reward Ratio: The Multiplier

Position sizing tells you how many shares. Risk/reward tells you whether the trade is worth taking.

Rule: Never take a trade with less than 1:2 risk/reward.

  • Risk $200 to make $400 minimum
  • Even with a 40% win rate: (0.4 × $400) - (0.6 × $200) = $160 - $120 = +$40 per trade average

At 1:1 risk/reward with a 40% win rate: (0.4 × $200) - (0.6 × $200) = $80 - $120 = -$40 per trade

The math shows why a mediocre win rate can still be profitable with good R/R ratios.

Expected Value = (Win Rate × Avg Win) - (Loss Rate × Avg Loss)

Only take trades where Expected Value is positive.


Applying This Across Asset Classes

Stocks (IDX / US Markets)

  • Use fixed fractional (2% rule) for most trades
  • ATR-based stops work well for trending stocks
  • Account for trading costs — on IDX, 0.19% buy + 0.29% sell = reduce effective R/R

Crypto

  • Reduce risk to 0.5-1% per trade due to higher volatility
  • 24/7 markets mean gap risk is lower (unlike stocks that can gap at open)
  • Use ATR with a higher multiplier (2.5x-3x) — crypto noise is loud

Forex

  • Pip-based position sizing: Lots = Risk Amount / (Stop in Pips × Pip Value)
  • Standard lot (100,000 units) on EUR/USD: 1 pip = $10
  • Mini lot: 1 pip = $1
  • If stop is 30 pips and risk = $200: Lots = $200 / (30 × $10) = 0.67 mini lots

Portfolio-Level Position Sizing

Individual position sizing is step one. Step two: make sure your positions don't all move together.

Correlation risk: Owning BBRI, BMRI, BBCA, and BBNI looks like 4 positions — but they're all Indonesian banking stocks. They'll all drop together in a banking crisis.

Rule: No more than 20-25% of portfolio in correlated assets.

Sector limits: Cap any single sector at 30% of portfolio, even if individual trades are sized correctly.

Volatility-adjusted allocation:

Adjusted Position Size = Base Position Size × (Target Volatility / Asset Volatility)

If you want consistent volatility across positions, size crypto smaller than blue-chip stocks automatically.


A Simple Position Sizing Spreadsheet

Here's what I track before every trade:

| Field | Value | |-------|-------| | Account Size | $10,000 | | Risk % | 2% | | Risk Amount | $200 | | Entry Price | $50.00 | | Stop Loss | $47.50 | | Stop Distance | $2.50 | | Shares to Buy | 80 | | Position Value | $4,000 (40% of account) | | Target (2:1 R/R) | $55.00 | | Potential Gain | $400 |

If position value exceeds 40-50% of account, I reduce risk% — never increase leverage to hit a target position size.


The Psychological Side

Position sizing also solves a behavioral problem: over-commitment.

When you're in a $4,000 position on a $10,000 account, every tick matters too much. You'll exit early, move stops, second-guess your plan. This is what kills trading accounts.

When you know exactly how much you can lose ($200, 2%), you can let the trade breathe. Stops don't feel like admissions of defeat — they're planned exits.

Trade smaller than you think you need to. The goal is to still be in the game after 100 trades, not to get rich on trade 3.


Summary: The Three Rules

  1. Never risk more than 2% of account on a single trade (use 1% for crypto/volatile assets)
  2. Define your stop BEFORE sizing your position — stop distance drives share count
  3. Only take trades with 1:2+ risk/reward — let math work in your favor

Position sizing won't make you a great trader. But getting it wrong will definitely make you a broke one. Master this first, and you've already beaten 80% of retail traders.

#trading#risk management#position sizing#stocks#crypto#forex
D
DevToCashAuthor

Senior DevOps/SRE Engineer · 10+ years · Professional Trader (IDX, Crypto, US Equities)

I write about real infrastructure patterns and trading strategies I use in production and in live markets. No courses, no affiliate hype — just documentation of what actually works.

More about me →