Blackjack Simulator with Card Counting in Excel
Our take
TLDR: Take this for a spin and give thoughts. And any ideas to speed up this up?
Here's a formula-driven blackjack engine inside Excel that deals shoes, plays the hands according to configurable rules and count-based strategy, calculates bets and outcomes, then summarizes how the betting system performs over hundreds or thousands of shoes. No visual basic or macros.
Basic Operation: Put in the bets you want to make at different true counts, then calculate. I do this by copying the formula down in HandEvaluate a few thousand rows. Change A2 to start at a different random shoe. Then refresh pivot table to view metrics).
I**'m not going to keep it public long. But I could use ideas to speed this up. And frankly, I'd like to show it off. Use only for personal use with credit to bluerog if you need. Don't monetize it.**
At a basic level, it works like this:
- The Shoe tab contains 1,000 randomized 6-deck shoes [XLOOKUP(SORTBY(SEQUENCE(312), RANDARRAY(312)),$A:$A,$D:$D)]
- The HandEvaluate tab walks through each shoe card-by-card.
- Each row represents a step in a hand: initial deal, player action, split branch, dealer action, or resolution.
- Formulas track the current hand state, running count, true count, decisions, bets, results, and final win/loss.
- The Rules and Betting tab controls rules, bet ramps, deviations options, and performance metrics.
- Performance merics use sumifs, but I pull those from a refreshable pivot table to speed metrics up.
- The Matrix tab allows the user to put in basic strategy and even deviations beyond the 20 or so most valuable ones.
Key features include:
- 6-deck shoe simulation
- Hi-Lo running count and true count
- Bet ramp based on pre-hand true count
- Basic strategy matrix lookups
- Illustrious 18 / Fab 4 style deviations
- 2-card vs 3+ card strategy logic
- Dealer H17 logic
- Double after split
- Insurance at count thresholds
- Split handling up to 4 hands
- Split ace rules: including can-split and one-card-only behavior
- Dealer blackjack and player blackjack handling
- Blackjack payout logic
Metrics:
- Win/loss settlement by individual player hand
- HandID and PlayerHandID tracking
- Shoe-level metrics
- EV, SCORE, N₀, risk of ruin, dollars per 100 hands, drawdowns, and bankroll growth metrics
Objectives:
- Test whether a blackjack strategy is profitable under specific rules.
- Show how much value a bet ramp and counting deviations add.
- Verify edge cases that simple simulators often miss, especially splits, split aces, doubles, insurance, dealer blackjack, and 3+ card deviations.
- Give practical bankroll and volatility metrics instead of just “win/loss.”
- Stress-tests exact stacked decks to confirm the logic is resolving hands correctly.
- Provides a transparent formula-based model where every decision and result can be audited in Excel.
[link] [comments]
Read on the original site
Open the publisher's page for the full experience