The New England Patriots finished the regular season 14–2, earning the top seed in the AFC playoffs. There was never much doubt that the Pats, led by quarterbacks Jimmy Garoppolo and Jacoby Brissett, would make the postseason. Since the NFL playoffs expanded to five teams per conference in 1978, no team with a record of 12–4 or better has ever been left out. (The postseason was further expanded to six teams per conference in 1990.) Just two teams with 11–5 records—the 1985 Denver Broncos and Matt Cassel’s 2008 Patriots—have missed the playoffs. But let’s forget reality. Is it theoretically possible for a 13–3 team to stay home for the postseason? What about 14–2? 15–1?

In each conference, the winners of all four divisions get an automatic ticket to the playoffs. They’re joined by two wild-card teams: the two non–division winners with the best records. If two or more teams finish with the same record, that tie is broken by a series of increasingly arcane rules. (Wild-card tiebreaker No. 10: best net touchdowns in all games.)

So, what we want to know is: In a given NFL conference, what’s the best possible record for the third-best non–division winner?

To figure that out, you need to understand the league’s schedule formula. There are four divisions per conference, and each of those divisions has four teams. Every NFL team plays the following set of regular-season games:

Two games each against its division rivals. The AFC North’s Baltimore Ravens, for instance, play home and away games against the Pittsburgh Steelers, Cincinnati Bengals, and Cleveland Browns.

One game each against all four teams from another division in its own conference. This season, every AFC North team played every AFC East team.

One game each against opponents from the remaining two divisions in its own conference. The Ravens played the Jacksonville Jaguars from the AFC South and the Oakland Raiders from the AFC West.

One game each against all four teams from a division in the opposite conference. This season, the AFC North played the NFC East.

Each team plays nine of the 15 possible opponents in its own conference. Since certain teams don’t play each other—the AFC’s Ravens and Houston Texans didn’t face off in 2016, for instance—it’s possible for there to be two 16–0 teams in the same conference. Both undefeated teams would make the playoffs as division winners, since they would’ve had to beat every team in their own division twice to finish 16–0.

To make an extremely obvious point: If two teams play each other, one of them is going to lose unless the game ends in a tie. To engineer a scenario in which the third-best non–division winner has the best possible record, you need to find a set of teams that play each other the bare minimum number of times. That way, everybody in that set can pile up wins without beating each other.

Given the NFL’s scheduling rules, for any set of seven teams in the same conference, the fewest number of intra-set games is 12. That set—let’s call it the Spectacular Seven—will have two teams from Division A, two from Division B, two from Division C, and one from Division D. (Any other divisional split, whether it’s 3–2–1–1 or 3–2–2 or 4–2–1 or 4–3, will necessarily have more intra-set games than a 2–2–2–1 split.) Now, let’s assume that every team in the Spectacular Seven wins all of its games outside the group. I set up such a scenario using the website NFL Playoff Predictor with the AFC North, AFC South, AFC East, and AFC West as Divisions A, B, C, and D respectively. The two AFC North teams, the Ravens and Steelers, are 12–0. The two AFC South teams, the Texans and Tennessee Titans, are 13–0. The two AFC East teams, the Buffalo Bills and New York Jets, are 12–0. And the lone AFC West team, the San Diego Chargers, is 14–0.

The Chargers, though, are irrelevant here—they’re going to make the playoffs as a division winner. So let’s trim the Spectacular Seven to the Super Six and give victories to the Chargers’ two opponents in their matchups against San Diego. That leaves us with two 12–0 teams in the AFC North (Ravens and Steelers), two 12–0 teams in the AFC East (Bills and Jets), and two 14–0 teams in the AFC South (Texans and Titans). And that leaves 10 remaining games between members of the Super Six: Ravens at Steelers, Steelers at Ravens, Bills at Ravens, Ravens at Jets, Jets at Steelers, Steelers at Bills, Texans at Titans, Titans at Texans, Bills at Jets, and Jets at Bills. That gives us 10 wins and 10 losses to distribute across the Super Six.

In the AFC South, Houston and Tennessee can finish 16–0 and 14–2; 15–1 and 15–1; 15–0–1 and 14–1–1; or 14–0–2 and 14–0–2. (The NFL considers tie games the equivalent of half a win and half a loss, so 14–0–2 is the same as 15–1 for tiebreaking purposes.) To maximize the record of our division runner-up, let’s have the Texans and Titans split their two games and each finish 15–1.

Now we have eight games to play among four teams, all of them members of the AFC North and AFC East. Those four teams must go a collective 8–8 in those games, through some combination of wins and losses (or in the case of ties, as many as 16 half-wins and 16 half-losses). For all four of these teams to finish 15–1 or better—leaving the third-best non–division winner with a 15–1 record—the group would have to go a collective 12–4 in these eight games, which is sadly impossible under current NFL rules. For all four of these teams to finish 14–1–1 or better—leaving the third-best non–division winner with a 14–1–1 record—the group would have to go a collective 8–4–4, which again is illegal. Thanks, Commissioner Goodell. The best we can do is have every team go 2–2, leaving us with four teams with identical 14–2 records. In that case, the Texans and Titans make the playoffs at 15–1, as do three of the four 14–2 teams from the AFC North and AFC East. Which unlucky team gets left out? When I played it out on NFL Playoff Predictor, it was the Jets. Realistic!

So, yes, a 14–2 team can miss the playoffs. Or, consider an alternative scenario: If every one of the eight games described above ended in a tie, the four top teams in the AFC North and AFC East would all finish 12–0–4, which is equivalent to 14–2. That means a team could win 12 games, go undefeated, and still miss the postseason.

That’s not all: It’s possible for two 14–2 teams in the same conference to miss the playoffs. Let’s expand the Super Six to the Excellent Eight: two teams each from every division in the same conference. For any such set of eight teams, the fewest number of intra-set games is 16—each member of the Excellent Eight plays four games against its fellow group members. If the Excellent Eight teams beat everyone else, they’ll all start with a record of 12–0. If those eight 12–0 teams all split their remaining four games, we’ll have eight 14–2 teams, two of which miss the playoffs. Again, there aren’t enough collective wins and ties to go around for a nonplayoff team to finish 15–1 or 14–1–1.

Last question: What’s the worst possible record for an NFL playoff team? Let’s imagine all four teams in one incredibly putrid division—we’ll call it the NFC South—lose every one of their out-of-division games, leaving them 0–10 before starting division play. If every team splits its six remaining games, one of them will emerge as a 3–13 division winner. (Who dat!) If every one of those intra-division games ends in a tie, the NFL will have an 0–10–6 playoff team. So, take heart, Browns fans: There is a path to victory for a winless pro football team.

It’s possible I’ve missed something. If you’ve got a different answer for any of the questions above or a better proof, leave it in the comments or send me an email. I’m also curious to know the best record an NBA and MLB team could have and miss the playoffs, as well as the worst record for a potential playoff team in either of those sports. If you’ve got thoughts on that, drop me a line.

Thanks to Gideon Rosinplotz for the question and to Rick Barnard, Kate Hill, and Daryn Ramsden for help thinking through the problem.