MLB Batting Order Optimizer — Build the Best Lineup by OBP and SLG
“Who bats leadoff?” is the oldest argument in a dugout, and most of the time it gets settled by who is fastest. Speed is the wrong input. The leadoff hitter takes more plate appearances than anyone else in the order across a season, so the job belongs to whoever makes the fewest outs — not whoever can steal a base after he reaches.
The Baseball NUT lineup builder sorts any nine hitters into an order using that logic, and prints the reason next to every slot so you can argue with it. It is free, there is no account, and it works the same whether you are filling out a Little League card or shuffling a fantasy roster.
How the Order Gets Built
Nine slots, three stats. On-base percentage sets the top, slugging sets the middle, and OPS fills in the rest.
Add more than nine hitters and the extras become a bench, sorted by OPS, so you can see who the first bat off it should be.
Why OBP Leads Off and SLG Hits Cleanup
The top of the order is about volume. Over a full season the leadoff spot comes to the plate roughly 750 times and the nine-hole about 600 — about 150 extra chances, handed to whoever you put first. You want those chances going to the hitter who ends the fewest innings, and the stat that measures exactly that is on-base percentage.
The middle of the order is about context. By the time the three, four, and five slots come up, the hitters ahead of them have had a chance to reach. That changes what a plate appearance is worth: a single with the bases empty and a double with two men on are not the same event, and slugging is what separates the hitters who cash those runners in. Hence power in the four-hole.
If those two ideas are new, What Is a Good OPS, ERA, and WHIP covers the benchmarks, and the stat glossary defines every term on the page.
A Worked Example
Here are nine real 2026 hitters, run through the builder exactly as it ships. Their season lines are on the right.
Notice slot one. Yordan Alvarez is the best hitter in this group by a wide margin — a 1.049 OPS — and the builder bats him leadoff rather than third, because his .436 OBP is also the highest. That will look wrong to anyone raised on “your best hitter bats third,” and it is the single most useful thing the tool does. The three-hole is a tradition. The extra 150 plate appearances are arithmetic.
Three Ways to Load a Roster
Manual entry
Type a name and an AVG, OBP, and SLG for each hitter. The inputs are forgiving about format — enter .370 or 370 and both register as .370, which matters when you are copying off a scorebook on a phone.
CSV or paste
Paste a roster or upload a .csv or .txt file with four columns. A header row is detected automatically, so you can export straight from a spreadsheet without cleaning it up first:
This is the path for coaches with a team spreadsheet already sitting in Drive — paste the whole roster at once instead of typing nine players in by hand.
MLB player search
Search any major leaguer by name and pull his real numbers, choosing a specific season or his career line. This is the fun one: build an all-time order, settle a fantasy argument, or see what your favorite team's lineup card would look like if it were sorted by production instead of by habit.
What It Does Not Do
The builder is a sorting heuristic, not a game simulator. It ranks your hitters on three rate stats and assigns slots in a fixed order. It does not simulate innings, and it does not account for handedness matchups, baserunning speed, stolen-base threat, defensive position, or who has been swinging a hot bat this week. A real manager weighs all of that.
That is a deliberate trade. Full lineup simulations move the needle by only a handful of runs across an entire season, and they need inputs most people do not have. Sorting by OBP and SLG captures most of the available gain from about thirty seconds of work, and it tells you why it did what it did — which a black box that spits out an order will not.
For form rather than season-long production, the 7-day board shows who is actually hot right now, and the comparison tool will put any two hitters side by side before you decide which one hits cleanup.
Build Your Lineup
Nine hitters is the minimum, the tool tells you how many more you need as you add them, and the whole thing runs in the browser — nothing is uploaded, and nothing is stored.
Related
Build an order, argue with it, then go check whether the hitter you buried at ninth is quietly the hottest bat on the roster. The full board is at baseballnut.app/stats.