Upload the player pool straight from DraftKings, FanDuel or Yahoo — nothing else. The tool pulls tonight's forward lines, power-play units and confirmed starting goalies from Daily Faceoff for the teams on your slate, then builds a diverse set of lineups ready to upload back. Free tool by kindoflost.
This reads the DraftKings NHL player-pool export (Position, Name + ID, Salary, Game Info, TeamAbbrev…), not a spreadsheet of your own.
📈 Drop projections here, or browse
Columns: an id or name column + a projection column.
🧩 Drop Yahoo_DF_contest_lineups_bulk_insert_template (or the single-contest insert template) here, or browse
Yahoo's upload wants nhl.p.X$nhl.g.Y IDs, and only the contest template has the game part. Without it the download uses the bare nhl.p.X IDs.
The bulk template starts every row with a Contest ID. Type it here and the download includes that column; leave it blank for the single-contest template, which has no such column.
Already have your own line chart? (optional)
🏒 Drop a line-combinations CSV here, or browse
Columns: Team, Unit, Player1…Player5. Unit is L1–L4 (forward lines), D1–D3 (pairings), PP1/PP2 (power-play units), or G (starter). For anyone who pays for a line-chart service and would rather use theirs.
2 · Trim the pool
Scratches, call-ups and anyone you’re fading can go. A shorter pool gives cleaner stacks and a faster solve. Anything the site marks OUT begins unchecked.
Optional. ESPN’s Out, IR and suspended players are unticked (tick them back if you disagree); Day-To-Day, Questionable and Doubtful only earn a badge. Source: ESPN injury report. For scratches announced after you build, use Check late news in step 4.
Optional. Adds each team's implied goals (the game total split by the moneyline) and enables the Vegas rules in step 3 (Tier 2). Source: ESPN, odds by DraftKings.
Line is the forward line (1–4) or defensive pairing (1–3) a skater belongs to; on a goalie, 1 means he is the confirmed starter. PP is the power-play unit, 1 or 2. Those two columns are what the optimizer stacks — leave them blank and there is nothing to stack.
Lock puts a skater or goalie into every lineup and outranks his exposure cap and cooldown. Every lock shrinks the variety of the set, so keep them few.
0 active
Team:
Pos
Player
Team
Salary
Proj
Value
Impl
Line
PP
Lock
3 · Rules
Preset:
Loads sensible defaults for the contest type. Tweak anything afterward — nothing is locked.
Saved setups— keep these rule settings and reuse them on any slate
Saves everything in this Rules card: preset, lineup count, stacks, lineup patterns, exposure and cooldowns. Tonight’s skaters, your locks and exclusions, typed projections and the goalies ticked in “Build around” are not saved — they change every slate. Setups stay in this browser only, and a matching name overwrites the old one.
Tier 1 · Site rules
NHL stacking is a heavier model than football, and it gets heavier as the batch grows: each new lineup has to differ from every lineup before it, so the 50th costs more than the 5th. Measured on a twelve-team (six-game) slate: about 2–2.5 seconds a lineup early in the batch and about 4–6 seconds by the fiftieth. Budget accordingly, and use Stop whenever you have enough.
The batch stops at this many seconds whether or not it reached your lineup count — on a big run this, not the constraints, is usually what ends it. This build allows up to 240s.
DraftKings requires skaters from at least three different teams. The goalie does not count toward it, which is why this is a separate control.
DraftKings only. The lineup has exactly 2 defencemen, so the UTIL spot is a C or W. Off by default. Solved by the full model (no fast path), so batches run slower.
Tier 2 · Within lineup
Line = a forward trio (LW-C-RW), four per team. PP unit = the five skaters on a power play, usually four forwards and a defenceman, picked across lines; two per team. Unit means either one. Defence pairs are read from the file and numbered, but cannot be stacked.
A forward line shares ice time and scores the same goals — one goal pays the scorer and both assisters. That is why stacking is a constraint here, not a preference.
A:unit(s) ×players
B:unit(s) ×players
C:unit(s) ×players
Each row is n units × k players, and the rows add up. A = 2 × 3 is the classic double stack: three players from each of two units, so 3-3. Adding B = 1 × 2 gives one more unit contributing two players, so 3-3-2. A unit can only satisfy one row, so the shapes never overlap.
Without this, "2 units × 3 players" can be satisfied by one team twice — a team's Line 2 and its PP2 share players, so about five skaters from a single team count as a double stack. That is a real play, but it is a different one. Off = allow it.
Off by default. Turning it on makes lineup generation much slower — about four times slower per lineup on a twelve-team slate, so a run builds far fewer lineups before the time limit. A power-play unit is five players drawn from several lines, which makes the lineup-diversity rules much harder to solve.
Only defencemen with PP = 1 can be picked. PP1 defencemen quarterback the power play and score well above other D — an MIT study of DraftKings NHL contests used this in its best-performing setting. Needs the lines loaded.
to
How much of the cap the stacked units are allowed to absorb. Keeps the optimizer from building a stack out of four cheap fourth-liners, or from spending everything on one line and filling the rest with minimum salary.
Lines above this number still count as stacks but contribute nothing to the salary window. 0 = count all of them.
Vegas rules (optional)
Press Load Vegas lines in step 2 first — these stay off until lines are loaded.
A team below the stack number: its lines and power-play units can't be stacked. A goalie whose opponent is implied at or above the second number is left out. Applied when lineups are built — the blue checkboxes in step 2 don't change. Teams with no line are never filtered.
Your goalie scores by stopping shots; those skaters score by taking them. Rostering both puts two halves of your own lineup in a zero-sum fight.
The team wins, so the goalie gets the win and the skaters get the goals. A strategy choice, not a site rule.
Uses the Line column on goalies (1 = confirmed). If nothing is marked, this is ignored rather than emptying the goalie slot.
Everyone dressed tonight has a line number, so a skater with the Line and PP columns both empty is a scratch, a call-up or on the taxi squad — priced, projected off a season average, and not playing. On by default for GPP. It does not make the solve faster; it stops the optimizer reaching for players who will not take a shift.
Tier 3 · Across lineups
The one that matters most in hockey. Each new lineup is compared against every earlier one, separately; against any single earlier lineup it may share at most this many lines or PP units. At 1, no two lineups can carry the same pair of stacks — you can reuse a line, you just cannot reuse both stacks from one earlier lineup. Two lineups can otherwise share eight of nine players and still be the same two stacks, which is why capping players is not enough. With power-play stacking on, this rule is the main reason each lineup takes longer than the last — later lineups can run out of time and come back as the best found rather than proven best. With lines only it costs very little.
Yahoo lineups carry two goalies. At 1, no two lineups have the same goalie pair — each goalie can come back, just not with the same partner. 2 or blank turns it off. 0 means no goalie is ever reused, which runs out of lineups fast on a small slate.
Looks at every unit used anywhere in the last K lineups and caps how many of them this lineup may bring back. At 1, a lineup reusing a recent line must find its other stack among units that have been rested. At 0 it is a literal ban — nothing from the last K returns, which is strict: on a twelve-team slate that runs dry after about 16 lineups. The GPP preset sizes K to the slate: 9 on twelve teams, fewer on smaller slates. 0 in the window box turns it off.
Cap on how many of your lineups any one player can be in. Locked players ignore this — always 100%.
Before each new lineup, the player(s) used most so far sit out that one lineup. An exposure cap only stops a player when he hits the cap, so a few players end up stuck at the cap and the rest are used little. Cooling off the top players pushes on the most-used ones every lineup, so usage spreads out: many players around 25–30% instead of a few pinned at the cap. Locked players and the goalie you build around never sit out. If a lineup cannot be built with that many players resting, fewer rest for that lineup.
Coverage rules (small slates)
Spread the set across line + goalie combinations instead of piling onto the top few. A "stack" here is a line; a lineup's stack 1 is the line with the most players in it, stack 2 the next. All off by default.
Only adds anything when "Max shared lines / PP units" is 2 or more (or blank): at 1, two lineups can never share both stacks anyway.
auto = 1.5 × lineups × stacks per lineup ÷ stackable lines (lines 1–2 by default), rounded up — about 1.5× an even share. An exact even share left no room for the other rules and ran out of lineups. Matters on big slates, where the other coverage rules hardly bind.
Lineup patterns — build a mix of lineup shapes instead of one shape repeated
Give each pattern a share and the tool splits the batch between them. Shares don't have to add to 100 — they're normalised. Leave them all at 0 to use the plain rules above for every lineup.
The split is exact, not random: ask for 30% of 20 lineups and you get 6, every run.
A pattern overrides the A / B / C stack shapes you set in Tier 2 above, and which kinds of unit may be stacked, for the lineups it governs. On top of that it adds the rules in the middle column, which have no control of their own. Everything else in Tier 1, 2 and 3 still applies exactly as you set it — salary window, exposure caps, cooldowns, minimum skater teams, max players per team, UTIL can't be a D, confirmed goalies, declared skaters, distinct stack teams. One exception: a pattern can switch on "goalie must come from a stacked team", but it cannot switch it off if you turned it on yourself. Patterns always stack power-play units, whatever the checkbox in Tier 2 says — they were designed around them, and the two that require a defenceman from each stacked team cannot be built from lines alone, because a power-play unit is where that defenceman comes from. So a run using patterns is as slow as one with power-play stacking on.
Pattern
What it forces
Share
Line + D, line + G, loose D
Each stacked team also gives a D or its goalie; goalie only from a stacked team
Line + D, line + D, free G
Both stacked teams give a defenceman; goalie unconstrained
Line + D, line + D, D's same game
As above, but the two defencemen come from opposite sides of one game
Two lines, one with its G, D's split
The two defencemen must come from different games; goalie from a stacked team
Build around goalies — split the batch between the goalies you pick, each one fixed for his share
Each goalie's share of the lineups is built with him locked in, which is faster than letting the solver pick the goalie (measured: about 25% per lineup). The player cooldown, exposure caps and shared-player limit don't count him, and his team is exempt from the stack cooldown — otherwise his group would stop after one lineup. A goalie's win bonus is the part of his score Vegas predicts best, so the favourites are ticked by default. Lineup patterns, if you use them, are split inside each goalie's group.
Goalie
Team
Opp
Salary
Proj
Status
Win %
Weight
Lineups
Each button fills the Weight boxes: Even = 1 each, By win % = his team's win probability, Underdog = 1 minus it (so the underdogs get the most). Type in any box to switch to Custom. A weight of 0 gives that goalie no lineups; a blank box counts as 1. Counts use the largest-remainder rule, so they always add up to your lineup count.
4 · Lineups
Optional, after the lineups are built: lists players now ruled out (ESPN injury report + Daily Faceoff scratches), how many of your lineups they are in, and suggests a replacement for each. You swap by hand on the site.
What is this NHL DFS lineup optimizer?
A free NHL DFS optimizer for DraftKings, FanDuel and Yahoo — no signup, no paywall, no
“3 free lineups” teaser. It solves a real mixed-integer program (the same math the paid
tools use) to build a set of lineups that are individually strong and collectively
different, because in large tournaments
one good
lineup is easy — twenty is the hard part.
How it works
Export the player pool from DraftKings, FanDuel or Yahoo and upload it. That is the only file you need.
The tool pulls the forward lines, power-play units and confirmed starting goalies for the
teams on your slate from Daily
Faceoff and fills the Line and PP columns. Hit refresh any time
— lines move at the morning skate and goalies get confirmed close to puck drop. Every
value stays editable.
Trim the pool: lock, exclude, or cap exposure on any player, and overwrite projections.
Set the rules — how many units to stack and how deep, what your goalie is allowed to
correlate with, and how different each lineup must be from the rest.
Generate. You get salary-cap-legal lineups in a CSV formatted for direct re-upload.
Why hockey stacks are different
DraftKings NHL Classic is nine slots — two centers, three wingers, two defencemen, a goalie
and a utility — under a $50,000 cap, with skaters from at least three teams. FanDuel NHL
Classic is also nine: two centers, two wingers, two defencemen, two utilities and a goalie, under a
$55,000 cap, with no more than four players from one team. Under the hood
that is a
knapsack problem: maximize projected points subject to the cap and the position rules.
What makes hockey its own thing is the unit. A forward line is three players who change
together, share ice time, and share goals — one goal pays the scorer and both assisters. A
power-play unit is five players doing the same thing with a man advantage, and it is not a
line: it is assembled from the best players across several lines, which is why it needs its own
column. Meanwhile your goalie is negatively correlated with the skaters he faces, so rostering both
is a bet against yourself. The optimizer treats all of that as hard constraints.
Common questions
Is it really free? Yes — it is a working demo of optimization models I have built for
20+ years. No account, no lineup limit tricks.
How current is it? As current as the source. Lines are cached for about ten minutes and
starting goalies for about four, and the refresh button goes past the cache. A goalie only counts
as starting when he is reported confirmed or likely — an unconfirmed goalie is the source
guessing from the schedule, and the tool will not pass a guess off as a confirmation.
Does it support Yahoo? Yes, multi-game contests. Yahoo lineups carry two goalies and no utility
under a $200 cap; the tool keeps the two goalies in different games. Upload the player export, plus the contest
template so the download has Yahoo's full player IDs.
Does it support FanDuel? Yes. Pick FanDuel in step 1 and upload the players-list CSV from
the contest page. The download is FanDuel's own upload format (C, C, W, W, D, D, UTIL, UTIL, G), up to
250 lineups per file. FanDuel's file has no starting-goalie column, so starters come only from the
line lookup — or from a 1 you type in a goalie's Line column.
What about Showdown / single-game contests? Not yet — classic full-slate only.
Are the projections any good? The optimizer uses the projections in your file — and you
can overwrite any of them. Its job is squeezing the most out of whatever projections you trust.
How do I use the Vegas lines? Load your file, then press Load Vegas lines in step 2 — NHL
lines post around game day, and preseason games carry none. Each team gets an Impl number: the goals
Vegas expects it to score, worked out by splitting the game total with the moneyline. It is an
approximation, not a sportsbook team total. Sort the list by Impl to see the slate from the top down,
then go to step 3 → Tier 2 → Vegas rules. Only stack teams implied ≥ means a team
below that number cannot have its lines or power-play units stacked. No goalie facing a team implied
≥ keeps your goalie away from the offenses Vegas likes. Both boxes start blank, which means off. They
never change the blue checkboxes, a team whose game has no line is never filtered, and if a number leaves
nothing to build with you get a message saying so.
What happens when I press Update injury list? Every skater and goalie on the slate is looked up in
ESPN’s NHL injury report. Players listed out, on injured reserve or suspended are unchecked — tick them back if you
disagree; Day-To-Day, Questionable and Doubtful players just get a badge. A confirmed starting goalie stays checked with a ⚠
badge, because a confirmation is fresher than an injury note; a skater on a projected line who ESPN lists
as out is unchecked with the same badge. On/Off by status above the list turns a whole status
group on or off.
What is Check late news for? Press it at the top of step 4 once your lineups exist —
handy after morning-skate news. It asks ESPN’s injury report and Daily Faceoff’s scratches whether anyone in your lineups has been ruled out since you
built them, then lists those players, shows how many of your lineups they are in, highlights those
lineups and suggests a replacement for each. It only advises: lineups are not rebuilt or
re-exported, so make each swap by hand on the site.
What are saved setups? The Saved setups box (top of step 3) remembers rule settings across
slates: name them, press Save current settings, and Load them later. Everything in the Rules card
is kept — preset, lineup count, stacks, lineup patterns, exposure and cooldowns — along with the
goalie split mode (Even / By win % / Underdog; typed weights return as Even). Tonight’s skaters, locks,
exclusions, typed projections and the goalies ticked in “Build around” are not kept, because they
change nightly. Vegas thresholds are kept only while Vegas lines are loaded. Loading a setup resets rules it
doesn’t mention to the page default, so an older setup can’t leave a newer rule on. Setups live
only in this browser — nothing is sent anywhere — and a different browser or device starts empty.
Up to 20 are kept; the same name overwrites.
Do you have one for other sports? Yes —
MLB and
NFL, which work the same way with
batting-order and quarterback stacking instead.
Get an email when we ship updates to the NHL optimizer. Low volume, unsubscribe anytime.
Questions people actually ask
The hockey vocabulary is the hard part, not the optimizer. Click any question.
What is the difference between a line, a power-play unit and a “unit”?
A line is a forward trio — left wing, centre, right wing — who skate a shift together. Four per team. A power-play unit is the five skaters a coach sends out on the man advantage, usually four forwards and a defenceman, picked across lines rather than being one line. Two per team. A defence pair is the two defencemen who skate together, three per team. Unit is this tool’s umbrella word for any group whose players score together, because the stacking rules treat them the same way. Only lines and power-play units can be stacked; defence pairs are read and numbered but never stacked.
Where do the line combinations come from, and do I have to supply them myself?
No. Upload the DraftKings, FanDuel or Yahoo player-pool CSV exactly as it downloads — that is the only file you need (on Yahoo, also add the contest template so the upload has Yahoo’s full player IDs). None of the sites ship line combinations, so the tool looks them up from Daily Faceoff, which publishes them free, for just the teams on your slate, along with power-play units and confirmed starting goalies. It pulls them when you load the pool and again whenever you hit refresh; lines move at the morning skate and goalies get confirmed an hour before puck drop. If the lookup fails — the source is down, or goes premium, as line-chart sites have a habit of doing — nothing breaks: the pool still loads and the solver still runs, and you can type the Line and PP columns in yourself, upload your own chart, or turn stacking off.
What does “2 units × 3 players” actually mean?
Three players from each of two different lines or power-play units — the classic double stack, six skaters in two correlated blocks. Each stack row reads n units × k players, and the rows add together rather than overlapping, because one unit can only satisfy one row. So adding row B at 1 × 2 gives you one more unit contributing two players: 3-3-2.
Do the two stacks have to be from different teams?
Yes, with Each stack from a different team on, which is the default. It matters more than it sounds: a team’s second line and its second power-play unit share players, so without that rule the solver can satisfy “two units” with about five skaters from one team and call it a double stack. Switch it off if you actually want a heavy single-team stack — it is a legitimate play, just a different one.
Can a stack be two defencemen?
No. Only lines and power-play units are stackable, and neither is a pair of defencemen. But a stack is not purely forwards either: every power-play unit includes a defenceman, so a 2-player power-play stack can legitimately be that defenceman plus a forward.
Is the stack salary window measured across all stacked players?
Yes — it sums the full salary of every selected unit, and it counts the whole unit, not just the members that ended up in your lineup. So the window has to move with the shape you asked for. Two lines is six salaries; add a power-play unit and it is eight. The 50–75% default suits the 2 × 3 GPP shape. For a single 1 × 3 stack the Cash preset correctly turns the window off, because half the cap on three players is unreachable.
“Max shared lines / PP units vs any prior lineup” — if I use a line once, can I use it again?
Yes, as often as you like. The check runs separately against each earlier lineup: against any single one of them, at most this many units in common. At 1, if lineup 1 was Colorado’s line 2 plus Pittsburgh’s line 2, a later lineup may reuse either one — it just cannot reuse both. In plain terms: no two lineups may carry the same pair of stacks. That is the rule that stops twenty lineups being twenty shades of the same two stacks, which a player-overlap cap cannot do — swap one winger and the stack is identical.
Why did I ask for 150 lineups and get 54?
Almost certainly the clock, not the rules. Each new lineup has to differ from every lineup before it, so the work grows as the set grows: measured on a twelve-team (six-game) slate, about 2.2 seconds a lineup over the first 25, 3.2 over the next 25 and 4.3 over the next 22. The message under the button tells you which of the two ran out. If it was time, use Keep going to N — it keeps what you have and constrains the new lineups to differ from them, which a fresh run cannot do because it has never seen them. Loosening the diversity settings is not the fix: it makes each solve slower, not faster.
Do the lineup patterns override the settings above them?
Only two of them. A pattern replaces your stack shapes (the A/B/C rows) and which kinds of unit may be stacked, for the lineups it governs. It then adds rules that have no control of their own — whether a stacked team must also give you a defenceman, whether your two defencemen come from the same game or different ones, and whether every stack must come from one game. Everything else still applies exactly as you set it: the salary window, exposure caps, cooldowns, minimum skater teams, max players per team, UTIL can't be a D, confirmed goalies and declared skaters. One asymmetry worth knowing — a pattern can turn on “goalie from a stacked team”, but it cannot turn it off if you switched it on yourself.
What actually changes between Cash and GPP?
Cash wants one best lineup and is happy to repeat it: a single 3-man stack, at least 90% of the cap spent, four skater teams, the goalie tied to a stacked team, and almost no diversity between lineups — which is correct, because in a cash game twenty near-copies of your best lineup is the right answer. GPP wants many different shots: two stacks, the salary window on, 40% player exposure, cooldowns, and unit-level diversity. The diversity is exactly what makes a GPP batch slow.
Is a unit cooldown of 9 too high?
It depends entirely on slate size, and the number is not arbitrary — it is ported from the Excel model this tool replaces. On a twelve-team (six-game) slate there are 48 forward lines to stack — 72 units if you switch power-play stacking on — so freezing the ones used in the last 9 lineups (up to 18) leaves most of them free. On a three-game slate there are about 24 lines, and a cooldown of 9 can put most of them on ice at once. So the tool now sizes it for you: when the pool loads, and whenever you pick GPP, K is set to three-quarters of the number of teams on the slate, between 2 and 9 — 9 on twelve teams, 4 on six. Type your own number and it stays. The companion setting caps how many recently-used units may return: at 1 a lineup reusing a recent line must find its other stack among rested units; at 0 it is a literal ban, which on a twelve-team slate with lines only ran dry after six lineups in testing — if that happens, the Relax one rule and continue button loosens one setting at a time.
Who built this
I'm Mario — an operations research analyst with 20+ years in optimization and supply chain
(Cargill, Cessna Aircraft, Textron Aviation). Daily fantasy lineup building is a knapsack problem in
a costume: the same constrained-optimization math I used for scheduling and routing, just with a
salary cap instead of a truck. This NHL DFS tool runs a real MILP solver (PuLP/CBC) end to end,
not a heuristic or a spreadsheet formula. More about me and the other free tools →