Dunkin’ Donuts is the city’s largest chain store, complete with a whopping 515 shops in the five boroughs — easily beating out Starbucks, which only has 283 locations, a new study claims.

The coffee and donuts chain has opened 39 new shops in the past year and is the first national retailer ever to boast more than 500 locations in the Big Apple, according to a report from the Center for an Urban Future.

The study, dubbed “State of the Chains,” found that Subway sandwich shop ranked the No. 2 biggest chain, with 467 locations, and Duane Reade/Walgreens placed third, with 318 stores.

Overall, most chain shops opened in Brooklyn in the past year, spiking from 1,470 to 1,511, a 3 percent increase, according to the report.

Manhattan saw a slight decline in chain store openings due to closures in and near South Street Seaport, the study notes.

Other popular retailers include MetroPCS, which has 261 locations, McDonald’s, which has 240 and Baskin Robbins, which has 202.

It’s the sixth year in a row Dunkin’ Donuts topped the list of national retailers with the largest number of shops in New York City.