After the “Music City Miracle” knocked the 1999 Buffalo Bills out of the postseason, Bills fans suffered through the longest playoff drought in American professional sports. But with only a few hours left in 2017, the streak came to a glorious end. After beating Miami on Sunday, Buffalo desperately needed Cincinnati to eliminate Baltimore, and Bengals quarterback Andy Dalton complied — finding Tyler Boyd for a game-winning touchdown on 4th-and-12 in the final minute. The play sent the Bills locker room into hysterics, while fans back home braved bitterly cold weather past midnight on New Year’s Eve to greet the team plane at the airport.

New head coach Sean McDermott has led the franchise out of the regular-season desert, but there’s an irony to his triumph: This Bills squad is actually worse than many of those that failed to make the playoffs since that 1999 season. There are Bills fans old enough to buy beer who can’t remember what a Bills playoff team looks like — but even they ought to be able to tell that this squad is something less than one of the 12 best teams in the NFL.

“You are what your record says you are,” Hall of Fame coach Bill Parcells famously asserted. But ESPN’s Brian Burke estimates that randomness accounts for about 42 percent of NFL outcomes, and the NFL’s playoff structure builds in even more inequity. The 2008 New England Patriots won 11 games but missed the playoffs, while the 2014 Carolina Panthers got in with a 7-8-1 record.

This year’s Bills team finished 9-7, but based on Football Outsiders’ estimated wins and Pythagorean wins metrics, it only earned 6.8 and 6.3 wins, respectively. Put another way, an NFL team that gets outscored by 57 points on the year (as the Bills did) mathematically ought to win about six or seven games.

But it’s not just about wins. Pick a metric of team strength, and the Bills are typically at or below the median: 21st in scoring differential, 15th in FiveThirtyEight’s Elo ratings, 23rd in Simple Rating System, 21st in Defense-adjusted Value Over Average.

These Bills don’t stack up well against the 17 iterations that came before them, either:

The 21st century has not been good to Buffalo The Bills’ past 18 seasons by Defense-adjusted Value Over Average, Pythagorean wins and estimated wins Season DVOA PYTHagorean WINS ESTimated WINS Actual WINS 2004 31.3% 11.1 12.4 9 2014 10.5 9.6 9.0 9 2015 2.7 8.5 8.8 8 2006 -2.1 7.7 8.0 7 2007 -5.0 4.9 8.0 7 2016 1.0 8.5 7.4 7 2000 0.6 7.0 7.3 8 2002 -8.0 7.5 7.1 8 2013 -3.3 6.7 7.1 6 2011 -9.7 6.4 7.1 6 2003 -7.3 6.8 7.0 6 2017 -9.8 6.3 6.8 9 2008 -8.4 7.8 6.7 7 2009 -10.4 5.9 6.6 6 2012 -12.1 5.7 6.5 6 2005 -17.8 5.2 5.8 5 2010 -21.3 4.3 5.5 4 2001 -22.0 3.9 4.2 3 Source: Football Outsiders

The best Bills team since 1999 was the 9-7 2004 squad. At 31.3 percent better than average, it was the NFL’s No. 3 team by overall DVOA. Buffalo’s defense, led by Pro Bowlers Takeo Spikes and Nate Clements, ranked No. 1. The team’s 12.4 estimated wins and 11.1 Pythagorean wins show they were actually much stronger than what their record said.

The 2004 Bills lost their first four games, three by a combined margin of just 8 points and the other a 31-17 loss to the (eventual Super Bowl champion) New England Patriots. They then went 9-2 over their next 11 games, including a six-game win streak during which they outscored their opponents 228-89. Needing one last win to secure a playoff berth, they tripped up against a Pittsburgh Steelers team resting some of its starters. Football Outsiders deemed the 2004 Bills the best team to miss the playoffs since 1986 — as far back as its data goes.

Despite racking up the same number of real-world wins, 2017’s Bills are a whopping 41.1 percentage points worse in DVOA. They also produced 5.6 fewer estimated wins and 4.8 fewer Pythagorean wins. Remember that 42 percent randomness? That this year’s Bills got to the same 9-7 record as the 2004 team suggests these two squads approached the upper and lower bounds of “lucky” and “unlucky” NFL results.

The 2017 Bills aren’t the best Bills team since 1999, or anywhere close — they’re actually no better than seventh-worst in any of these metrics. Outside of running the ball with LeSean McCoy, these Bills don’t do anything well: They’re 29th in offensive yardage and 26th in yardage on defense. They keep their heads above water with a per-drive turnover rate that’s a little higher on defense (13.1 percent, 10th-best) than offense (8.9 percent, eighth-worst).

2012 is the most recent year the Bills weren’t better across the board than they are now — and that group went 6-10.

None of this can take away the joy Bills fans everywhere felt when the Ravens’ Week 17 collapse handed their team a wild-card berth, of course. But there’s a reason the Bills organization sent the Cincinnati Bengals thank-yous: This trip to the postseason was much more about being lucky than good.

Check out our latest NFL predictions.