HomeGuidesHow the Squad Optimizer works

How the FPL Squad Optimizer works

A full breakdown of every step — from raw data sources through to the linear program that selects your squad — including what the model does well and, honestly, where it doesn't.

Try the Squad Optimizer →
35/38
GWs above FPL average
+18.9
pts/GW advantage
841
players tracked live

Where the data comes from

Every six hours the model refreshes from four sources. The official FPL API provides each player's price, position, injury status, and recent point tallies. Live betting odds from the markets add match-level win probabilities, clean sheet odds, and over/under totals — the collective wisdom of millions of bets is a more accurate read on fixture difficulty than any static rating system.

The third source is Understat's non-penalty expected goals and expected assists, smoothed over the trailing season with a Bayesian prior. This separates underlying output from noise: a striker who missed three sitters and a striker who scored a long-range fluke look identical in the goals column, but very different in xG. Finally, the model tracks each player's starts ratio — the fraction of recent gameweeks they actually started, not just appeared. Rotation risk is priced in automatically.

How expected points are calculated

For every player, the model assembles a set of probability estimates for each scoring event in the upcoming gameweek. Goal probability comes from match odds multiplied by the player's Understat xG rate, scaled by their starts probability. Assist probability follows the same logic using xA. Clean sheet probability — derived directly from betting odds — drives the majority of expected points for defenders and goalkeepers, since a clean sheet is worth six bonus points plus the appearance points.

A home/away multiplier is applied to account for the well-documented advantage of playing at home, which is worth roughly ten to fifteen percent on raw attacking output. The Bayesian prior prevents overreaction: a player with three goals in one week doesn't inflate permanently, and one in a brief dry spell isn't written off if their underlying numbers remain strong.

All of these components are summed into a single xP value and then multiplied by the starts probability one final time. The result is a number that reflects both how likely a player is to play and how much they're expected to score if they do.

The squad selection problem — and how LP solves it

With an xP value for every player in the league, the optimizer's job is to find the best possible combination of 15. The problem is that there are hundreds of millions of valid squads that satisfy FPL's rules — you cannot check them all manually, and gut feeling won't find the optimal budget allocation across all 15 slots simultaneously.

The solution is a mixed-integer linear program. Formally, it solves:

Maximise: Σ (xP × selection_variable)
Subject to: budget ≤ your limit, 2 GKP + 5 DEF + 5 MID + 3 FWD,
max 3 players per club, any force-include/exclude overrides

This is solved exactly — not approximated, not randomly sampled. The result is the mathematically optimal squad within every constraint you've set. Captain is assigned to the highest individual xP in the starting XI, vice-captain to the second-highest.

Where the model is strongest

Outfield attacking returns — goals and assists for forwards and midfielders — are the model's clearest signal. The combination of live odds and season-level xG/xA consistently identifies players with the best ceiling in any given gameweek, regardless of recent form noise.

Defensive clean sheets are the second area where the model performs well. Betting markets for clean sheets are highly informative, and the model reliably identifies defenders facing weak attacks in favourable home fixtures. The LP then exploits budget efficiency in ways that manual selection misses: shaving £0.2m across three defenders to unlock a premium captain is a common output that most managers would never arrive at by hand.

The model also responds to fixture difficulty more precisely than a static FDR table. Two fixtures both rated FDR 3 can have very different underlying odds — one priced at evens, the other at 5/4 — and the model treats them accordingly.

No model is perfect — here's where ours falls short

Goalkeeper prediction is the hardest problem in FPL analytics. Beyond clean sheet probability, save points and penalty saves introduce far too much randomness to model reliably. The optimizer picks the goalkeeper most likely to keep a clean sheet, but the honest advice is not to over-index on GKP rank. Rotating two budget goalkeepers by fixture quality is often just as effective.

Blank and double gameweeks are another genuine edge case. The optimizer works one gameweek at a time using next-GW data only, so a player blanking in GW+1 will rank poorly even if they have two fixtures in GW+2. The xP Explorer handles this — its multi-GW view projects points across up to five weeks so you can plan around fixture swings before you make transfer decisions.

Late team news is a structural limitation. Lineups are confirmed roughly 75 minutes before kick-off, but the starts probability updates only when the FPL API reflects new information. Running the optimizer as close to the deadline as possible reduces this exposure. Similarly, set-piece takers — who earns penalties, free-kicks, or corner deliveries — aren't tracked directly. xG/xA partially captures set-piece involvement, but a new taker who emerged from a summer transfer can take a few gameweeks to show up meaningfully in the data.

Related guides

How the Expected Points Explorer works

How multi-GW xP projections are calculated and how to use the xP Explorer table.

FPL wildcard strategy

When to use your wildcard and how to use the optimizer to build the best possible rebuild squad.

Try the optimizer →

Set your budget, lock in any must-haves, and get your mathematically optimal FPL squad in seconds. Free, no account needed.

Open the optimizer