How to build a simple team rating at home
A useful team rating needs only scores and a spreadsheet. This article walks through a four-team example by hand, then shows how to scale it, adjust for home court, turn ratings into win probabilities and avoid the common traps.
The ratings you see in print and online can look like the product of mysterious machinery. They are not. The core idea behind most of them is one you can build yourself in an evening with a spreadsheet and a list of final scores, and the result will be a better guide to team strength than the standings. Building one also teaches you more about what a rating does and does not know than reading about any number of them.
The method here is the one behind the Simple Rating System that many statistics sites publish: a team's rating is its average scoring margin, adjusted for the strength of the opponents it faced. Because opponents' strengths depend on their own opponents, the calculation is circular, but the circle can be broken by repetition. This article shows the logic on a four-team league small enough to do by hand, then explains how to scale it to a full league, how to account for home court, how to turn ratings into win probabilities and what pitfalls to avoid. It pairs naturally with Strength of schedule and how to adjust for it and Margin of victory and what it says about a team's true level.
Why records are not enough
A win-loss record counts every win the same and ignores who the opponents were. Two teams with the same record may have played very different schedules, and a team can win many close games without being strong. Scoring margin carries more information, since a team that wins by an average of ten points is almost certainly better than one that wins by an average of two. That relationship is the basis of Pythagorean wins: using points to predict records. A rating built on margins is therefore a better predictor of future results than the record that produced it.
But margin alone has a flaw. A team that crushes weak opponents will have a large average margin that overstates its quality, and a team that plays a hard schedule will have a small one that understates it. The fix is to credit or debit each team for the strength of the teams it played. That is the whole trick, and it is simple to state: a team's rating equals its average margin plus the average rating of its opponents.
A four-team example
Imagine a tiny league with four teams, A, B, C and D, who play each other once on neutral courts. The results, written as the winner's margin, are these.
| Game | Winner | Margin |
|---|---|---|
| A vs B | A | 10 |
| A vs C | A | 5 |
| A vs D | D | 10 |
| B vs C | B | 8 |
| B vs D | D | 10 |
| C vs D | C | 4 |
Step one: average margin. For each team, add up the margins from its point of view, counting wins as positive and losses as negative, and divide by games played. Team A is plus 10, plus 5 and minus 10, a total of plus 5 over three games, or 1.67 per game. Team B is minus 10, plus 8 and minus 10, which is minus 12, or minus 4.00 per game. Team C is minus 5, minus 8 and plus 4, which is minus 9, or minus 3.00. Team D is plus 10, plus 10 and minus 4, which is plus 16, or 5.33. The four averages add to zero, as they must, because every point one team gains is a point another team loses.
Step two: adjust for opponents. Now give each team credit for the quality of its opponents, using the averages from step one as a first guess. Team A played B, C and D, whose average margins are minus 4, minus 3 and plus 5.33. Their mean is minus 0.56. Team A's adjusted rating is its own 1.67 plus minus 0.56, or 1.11. Doing the same for the others gives B at minus 2.67, C at minus 2.00 and D at 3.56. Team D drops from 5.33 to 3.56 because the teams it beat were weak. Team B improves from minus 4.00 to minus 2.67 because it lost to the two strongest teams.
Step three: repeat. The opponents' ratings changed, so the adjustment should be redone with the new numbers. A second pass gives A at 1.30, B at minus 3.11, C at minus 2.33 and D at 4.15. A third pass gives A at 1.24, B at minus 2.96, C at minus 2.22 and D at 3.95. The numbers wobble but settle. After about eight passes they stop changing at A 1.25, B minus 3.00, C minus 2.25 and D 4.00.
Those final ratings mean something specific. Team D is expected to beat an average team by about four points on a neutral court, Team A by about one, and Teams B and C to lose to an average team by about three and two. If D played B on a neutral floor, the rating gap of seven points says D should win by about seven.
There is a shortcut for this special case, in which every team has played every other once. The final rating equals the average margin multiplied by the number of teams minus one over the number of teams. With four teams, that is three-quarters of the average margin: 0.75 times 1.67 is 1.25, and 0.75 times 5.33 is 4.00. Real leagues do not play balanced schedules, so you need the repeated adjustment, but the shortcut is a handy check on a spreadsheet that you have built.
Scaling it to a real league
With 30 teams and a full season, the steps are the same, only longer. A spreadsheet handles it in a few stages.
- List the games. One row per game, with the date, home team, away team and the two scores. Many sports sites let you copy a season of scores into a spreadsheet.
- Make a row for each team in each game. For every game, you want two entries: the home team with its margin (home score minus away score) and the away team with its margin (the opposite). This "long" format makes the averaging easier.
- Compute each team's average margin. In most spreadsheets you can do this with a function that averages a column's values where the team name matches, such as AVERAGEIF.
- Find each team's average opponent rating. Add a column that looks up the rating of the opponent in each row, then average those values by team. At the start, use the average margins from step three as the ratings.
- Add and repeat. New rating equals average margin plus average opponent rating. Copy the new ratings back into the opponent lookup and repeat until the ratings stop changing. For a 30-team league, 10 to 20 passes are usually enough. Some people automate the loop; others copy it down a handful of times.
- Re-center. Make sure the ratings sum to zero by subtracting their average from each, so zero means an average team.
You will find the ratings land in a familiar order. They usually track the standings, with a few differences, and those differences are the interesting part: a team with a mediocre record and a high rating has been unlucky or has played a hard schedule, and a team with a strong record and a lower rating has been fortunate.
Adding home court
The four-team example ignored location. In a real league, home teams score more, as discussed in Home-court advantage in the numbers, and ignoring this makes ratings depend on how many of a team's games were at home. The fix is to subtract the home edge from each home team's margin and add it to each road team's margin before doing the averaging. A reasonable edge for the NBA is in the range of two to three points; using about three is a common simplification. College and the WNBA have their own figures, and it is worth looking them up for the league you work with.
The adjustment changes the results most for teams with lopsided schedules. A team that played a stretch of games at home gets less credit for its margin, and a team that played on the road gets more. It is a good place to see why a rating beats a raw record.
Turning ratings into win probabilities
A rating gap is a predicted margin, and a predicted margin can be turned into a win probability. In basketball, the actual result of a game scatters around the prediction with a spread of roughly a dozen points in the NBA. This is a rule of thumb, and you can measure it on your own data by taking the difference between predicted and actual margins across all games and computing their standard deviation. Once you have a number, use a normal curve to convert a margin into a probability. A spreadsheet's NORM.DIST function does this.
The results are intuitive. With a spread of about twelve points, a predicted margin of 2 gives the favorite roughly a 57 percent chance, a margin of 5 about 66 percent, and a margin of 10 about 80 percent. In the four-team example, Team D against Team B on a neutral floor, with a seven-point gap, is about a 72 percent favorite. Give the favorite a home edge of three points and the margin becomes ten, and the probability becomes about 80 percent. Give it to the other side and the margin is four, about a 63 percent chance.
Those are the building blocks of the forecasts in Simulating a season: how win probabilities are built. Once you can produce a probability for each remaining game, you can estimate a team's expected wins by adding the probabilities, and you can simulate the season by drawing random outcomes.
Improving the rating
Once you have the basic version, a few upgrades are worth considering.
Cap the margin. A 35-point win over a team that emptied its bench says little about strength. Capping the margin at, say, 15 or 20 points makes the rating less sensitive to blowouts and, usually, a better predictor. The cap is a judgment, so test several values and see which predicts next games best.
Separate offense and defense. Instead of one margin, compute two ratings: points scored and points allowed per 100 possessions, each adjusted for the opponent. The two together give net rating, as in Net rating: the best single number for a team, and tell you why a team is good. Doing this requires an estimate of possessions per game, which can be built from the box score, and it removes the distortion caused by pace, a topic in Pace: possessions per game and why it changes everything.
Weight recent games. If a team changed its roster or its coach, last month's games say more than last October's. Giving older games less weight lets the rating adapt, at the cost of using less data. The rating system built from Elo, described in Elo ratings in basketball: the idea and its uses, does this automatically.
Add priors early in the season. In the first weeks, ratings are noisy. Starting each team from last season's rating, shrunk toward zero, and letting this season's games take over gradually, produces steadier early-season numbers.
Checking whether it works
A rating is a claim, and you can test it. Set aside the most recent few weeks of games, build the rating from the games before them, and use it to predict the margin in each held-out game. Then compare your predictions with what happened. Two simple measures are enough: the average size of the miss, ignoring direction, and the share of games in which the rating picked the winner.
The comparison that matters is with a baseline. A naive predictor that simply says "the home team wins by three" has a certain average miss; so does a predictor that uses each team's raw record. If your rating cannot beat both, something is wrong, perhaps in the home-court adjustment or the opponent lookup. If it does beat them, you have built something useful, and you can try the upgrades above one at a time, keeping each only if the held-out miss gets smaller.
Expect modest results. Picking winners correctly in about two games out of three is typical for ratings of this kind in the NBA, and the average miss in margin is large, because single games are noisy. That is not a failure of the rating. It is the nature of the sport, and it is the reason the numbers are best used for probabilities, not certainties. The calibration check described in the article on Elo ratings applies here too: of the games you gave the favorite a 70 percent chance, did the favorite win about 70 percent of the time?
Pitfalls
The method is simple, and so are the ways to go wrong.
- Small samples. After ten games, a team's rating has a wide margin of error. Treat early-season numbers as provisional, as explained in Small samples in basketball: when a hot streak is noise.
- Disconnected schedules. In a league where teams play few opponents outside their own group, such as college basketball, the ratings of whole groups depend on a handful of cross-group games. The calculation still runs, but the comparison between groups is shaky.
- Ignoring roster changes. The rating describes the team that played the games. If a star is traded or injured, the rating is behind the facts.
- Mistaking a rating for a destiny. A rating is the best estimate of strength given the games so far. It does not say who will win a series, and the playoff version of a team can differ from the regular-season version.
- Overfitting. If you adjust the cap, the home edge and the weighting until the rating matches last season perfectly, you may be fitting noise. Keep the choices simple and test them on games the rating has not seen.
What to take away
A basic team rating is average margin plus average opponent rating, found by repeating the calculation until it settles. With home court removed, margins capped and ratings turned into probabilities through a normal curve, the home-built version is a respectable forecasting tool and a clear lesson in how the professional versions work. The standings and scores that feed it are on the standings page and the scores page, and the best test of your rating is to compare it with the table and see where it disagrees.