Lottery pattern-workbench

Mega Millions
Strategy & Banker Lab

Two separate number-selection methods, a live-refreshing draw archive, and a walk-forward back test. The Banker engine and Date & Anchor engine remain distinct so their assumptions and results are easy to audit.

Loading draw archive…Bundled fallback history is available offline.
Important: Mega Millions draws are random. These strategies organize number selections; they cannot predict winning numbers or improve the odds. Current format: five white balls from 1–70 and one Mega Ball from 1–24. Historical Mega Ball records before April 8, 2025 can be 1–25.

Banker strategy settings

Weighted sum-seed voting: for each of the last N draws, the app calculates four seeds from the five-white-ball sum: the sum itself, sum + A, sum + B, and sum × multiplier. Each seed votes for a number folded into 1–70. More recent draws receive higher weights; optional ±1 neighbours receive half-weight. The highest-scoring numbers form the pool and top-ranked numbers become bankers. Ties are resolved by longer time since a number last appeared, then lower number.

Next draw

How to read the Banker output

A banker is simply one of the highest-voted white-ball candidates from this formula; it is not a lottery term or a higher-probability number. The pool is a shortlist ranked by the same vote scores. The Mega Ball candidates use the latest draw's white-ball sum and Mega Ball as modular inputs. Each white-ball number still has the same 5-in-70 chance in a fair draw.

Use the Back test tab to check this Banker method against earlier draws without letting the tested draw leak into its own pool. The Date & Anchor method has a different formula and is not included in this back test.

Code 76 · Seven-draw banker engine

Calculating the seven-draw Code 76 pool…

This is a separate strategy from weighted sum-seed voting. It derives two banker candidates from each of the seven most recent completed draws, then ranks candidates by repeat votes (newer source draws win ties). Fixed bonus candidates 19–23 are shown separately and are not counted as bankers.

Code 76 strategy · exact rules, corrected

Input: the previous seven completed draws, oldest to newest. For each source draw, sort its five white balls ascending and calculate two candidate bankers:

Method 1 — two largest: add the two largest white balls and 76. From the resulting number, subtract its first digit from its final two digits. Example: 29 + 35 + 76 = 140 → 40 − 1 = 39.

Method 2 — first and last: add the smallest and largest white balls and 76. Concatenate the first and last digits of the result, then add its final two digits. Example: 13 + 35 + 76 = 124 → 14 + 24 = 38.

The original code's formula did not implement either displayed example. This version implements the written digit operations consistently and folds out-of-range values into 1–70.

Current seven-draw output

Bonus candidates

19 20 21 22 23

These are carried over from the supplied code as a separate fixed white-ball bonus shortlist. They are not Mega Ball predictions and are evaluated separately from generated bankers.

Automatic Code 76 optimizer · train, then test out of sample

The optimizer searches combinations of lookback window, formula selection, recency weighting and pool size. It selects settings using only the earlier training segment, then freezes those settings and evaluates them on the later holdout segment. During the holdout, each prediction still uses only draws available before that result.

Ready when the draw archive is loaded.
No optimization run yet. The optimizer does not change the live strategy settings automatically.

1 · Date strategy / code

The chosen date is converted into a code. The code is not learned from draw data; it is a date-derived input chosen by this method.

2 · Previous draw

The app calculates the previous white-ball sum and explores nearby values and derived anchors.

3 · Anchor builder

Candidate combinations

Enter a date and/or anchors, then generate combinations.

Strategy summary

Your derived code, sum and candidate pool will appear here.

How the Date & Anchor method works

1. Make a date code: choose the sum of date digits, day + month + year-digit sum, day of month, or day of year. An override can replace the calculated code.
2. Convert the code into anchors: map the code, its digit sum, and code × 7 into 1–70, then add manual anchors and the previous draw's five white balls.
3. Expand the pool: optionally add each anchor's ±1 and/or ±5 neighbours; remove duplicates and out-of-range values.
4. Rank combinations: test five-number combinations from the first 24 pool entries, keep sums inside the selected band, and rank the combinations by distance from the target sum. Show up to 12. Mega Ball suggestions are derived from the previous Mega Ball, date code, and anchors.

This is a deterministic number-selection recipe, not a statistically validated signal. It does not use the Banker voting model or the Back test.

Draw history tracker

Full CSV archive from GitHub; newest draws appear first. Each row also compares the prediction pools formed strictly from the seven draws before that result. Green rings mark actual hits.

Loading…

Add a newer draw manually

Use this only when a result is missing from the GitHub feed. Format: five white numbers, a slash, then the Mega Ball. This entry is saved locally in this browser and is not uploaded to GitHub.

Back test

For each draw, the pool is built only from the draws before it, then compared with what was drawn. It uses the settings on the Banker predictor tab. This walk-forward test compares the weighted sum-seed pool with the separate Code 76 seven-draw banker pool. Every prediction uses only draws that occurred before the tested result. Date & Anchor is not included because it requires a target date and user-configured anchors.

Actual hitBanker candidate
Data source: jbaranski/jeffs-lottery-utils · megamillions.csv. The repository describes its datasets as updating a few hours after each draw, so this is a GitHub-backed refresh feed, not a guaranteed instant official feed. Verify results with the official Mega Millions winning numbers page. Play responsibly.