New England Patriots quarterback Tom Brady grew up in the San Francisco Bay Area idolizing Joe Montana, Steve Young and the San Francisco 49ers. Now, after winning his fourth Super Bowl on Sunday, Brady has helped the Patriots cement their place alongside the 49ers among the top NFL dynasties of all time.

Whether the Patriots or the 49ers rank as the top modern NFL dynasty depends on the length of the period you consider. In the chart below, I’ve measured the top franchises over periods ranging from one year to 25 years. Rankings are based on a team’s average Elo rating at the end of each season. (We’ve calculated Elo ratings back to the AFL-NFL merger year of 1970, so great teams before that — like the Green Bay Packers of the 1960s — are not considered.) Here’s the list:

Brady’s 2007 Patriots finished with the highest single-season Elo rating ever, despite being upset in the Super Bowl by the New York Giants. Even if you’re no fan of the 2007 Patriots, another Brady team ranks second: the 2004 Patriots.

But when we’re thinking about dynasties, we’re thinking about success over a multi-year period. Brady’s 2003 and 2004 Patriots are one of seven franchises to have won consecutive Super Bowls, and on the Elo list they’re essentially tied with the 1992-93 Dallas Cowboys and 1972-73 Miami Dolphins for the best two-year runs ever. The early 1990s Cowboys earn the nod for the top three- and four-year peaks, although it’s a close call in each case.

For periods of longer than four years, the top two franchises become pretty clear: the Patriots and the 49ers:

The Patriots rate as having the best five- and six-year runs;

The 49ers have the best seven- and eight-year stretches;

The Patriots then overtake the Niners as the best dynasty for periods of nine through 12 years;

But the 49ers win again for periods of 13 years and longer.

The 1970s Pittsburgh Steelers is the other franchise that can make a case for being the top modern dynasty. The Steelers won four Super Bowls in a six-year stretch in the 1974 through 1979 seasons and are extremely competitive with the Patriots and the 49ers in Elo for the top six- and seven-year runs.

But those Steelers did not have the longevity of the 49ers or the Patriots. Pittsburgh’s quarterback, Terry Bradshaw, was not terribly effective before or after his Super Bowl run. Brady, by contrast, has been anywhere from good to MVP-caliber since he first took over the Patriots’ starting job in 2001, and the Patriots have not had a losing year since. The 49ers, meanwhile, had 16 consecutive winning seasons from 1983 to 1998.