There's no denying that Americans love coffee: Over 80 percent of the population lives within 20 miles of a Starbucks. So just how much money does the country spend on cups of java? Loan company Earnest combed through data from over 350,000 credit card transactions to see how, and where, the residents of five major cities — Boston, San Francisco, Los Angeles, New York, and Chicago — buy their coffee.

Boston loves coffee. Five percent of all credit card transactions in Boston are for coffee; 49 percent of those occur at Dunkin' Donuts.

Bostonians invest the largest percentage of the total amount they spend to coffee shops, while San Franciscans invest the least. Earnest also took a look at which major stores — such as Starbucks, Dunkin' Donuts, and Peet's Coffee —people purchased their drinks at. For this study, smaller indie coffee shops were not identified by name, as their names would be unrecognizable among reams of credit card transactions. They appear in the "other" category, below.

Boston loves coffee. Five percent of all credit card transactions in Boston are for coffee; 49 percent of those occur at Dunkin' Donuts. Only 40 percent of that five percent are for Starbucks. Granted, there are more Dunkin' Donuts locations than Starbucks outlets in Boston.

Starbucks reigns supreme in Los Angeles.

Dunkin' only recently entered the California market, so it makes sense that Starbucks reigns supreme in Los Angeles where 63 percent of coffee drinkers prefer it over local chain Coffee Bean & Tea Leaf as well as West Coast chain Peet's. In San Francisco, 48 percent of the coffee drinking population prefers Starbucks. As for New York City, caffeine addicts are split fairly equally between Starbucks (42%) and Dunkin' Donuts (35%).

Chicagoans tend to spend more at Starbucks than citizens of most other cities. On average, they drop $8.69 per visit. While Boston residents may frequent Dunkin' Donuts the most, compared to other cities, they tend to spend less per visit. Perhaps they go right for the coffee and avoid the doughnuts? The data comes down to this: Boston really loves coffee, especially when it comes from Dunkin' Donuts.