← Back to Tools

💰 Kelly Criterion

Optimal bet sizing based on your edge

The Kelly Criterion calculates the mathematically optimal bet size to maximize long-term growth. Enter your win probability and the odds offered.

For informational purposes only. Not legal gambling advice. Must be 21+ in your jurisdiction.
Gamble responsibly. If you or someone you know has a gambling problem, call 1-800-522-4700.

// Calculator function americanToDecimal(odds) { const o = parseFloat(odds); if (isNaN(o) || o === 0) return null; return o > 0 ? (o / 100) + 1 : (100 / Math.abs(o)) + 1; } function calculate() { const winP = parseFloat(document.getElementById('winProb').value) / 100; const dec = americanToDecimal(document.getElementById('odds').value); const bankroll = parseFloat(document.getElementById('bankroll').value); if (isNaN(winP) || !dec || isNaN(bankroll)) return; const b = dec - 1; // decimal odds - 1 = payout ratio const q = 1 - winP; // loss probability // Kelly formula: f* = (bp - q) / b const kelly = (b * winP - q) / b; const edge = ((winP * dec) - 1) * 100; document.getElementById('edge').textContent = edge.toFixed(2) + '%'; document.getElementById('edge').className = 'result-value ' + (edge > 0 ? 'green' : 'red'); if (kelly <= 0) { document.getElementById('kellyPct').textContent = '0%'; document.getElementById('optimalBet').textContent = '$0'; document.getElementById('halfKelly').textContent = '$0'; document.getElementById('quarterKelly').textContent = '$0'; document.getElementById('noEdge').style.display = 'block'; } else { const kellyPct = (kelly * 100).toFixed(2); const optimal = bankroll * kelly; const half = bankroll * kelly * 0.5; const quarter = bankroll * kelly * 0.25; document.getElementById('kellyPct').textContent = kellyPct + '%'; document.getElementById('optimalBet').textContent = '$' + optimal.toFixed(2); document.getElementById('halfKelly').textContent = '$' + half.toFixed(2); document.getElementById('quarterKelly').textContent = '$' + quarter.toFixed(2); document.getElementById('noEdge').style.display = 'none'; } document.getElementById('results').classList.remove('hidden'); // Increment smart bets counter if (window.incrementSmartBets) window.incrementSmartBets(); } document.addEventListener('input', function(e) { if (['winProb', 'odds', 'bankroll'].includes(e.target.id)) { const r = document.getElementById('results'); if (!r.classList.contains('hidden')) calculate(); } }); calculate();