The news comes as the Seattle, Wash.-based firm is being criticized after two black men were arrested in a Philadelphia Starbucks store after asking to use the restroom without making a purchase. The incident has led to protests and boycotts nationwide, while the manager involved in the situation has since left Starbucks’ Philadelphia location where the arrest took place.

“Closing our stores for racial bias training is just one step in a journey that requires dedication from every level of our company and partnerships in our local communities,” said Starbucks CEO Kevin Johnson in a statement Tuesday.

Closing thousands of stores could be costly for the company.

Starbucks-owned stores made about $ 4.7 billion in revenue over the most recent quarter, according to the company’s latest earnings report. Divide that by three, and you get about $ 1.6 billion per month. Divide again by 30, and you get about $ 53.3 million every day. Divide again by 24, and you get about $ 2.2 million every hour. So if you assume each company-owned Starbucks store will close for about four hours over a single afternoon, that’s roughly $ 8.8 million in revenue the company will potentially miss out on, by this admittedly back-of-the-envelope math.

It’s worth noting a couple of caveats: Not every company-owned Starbucks store will close, so this estimate may be slightly high. Meanwhile, some customers may simply wait until Starbucks re-opens to get their fix on the day of the closures, but as a self-identifying caffeine addict, I’d argue most people will just get their fix at a rival chain or local coffee shop.

But for Starbucks, the price may be worth paying. The company’s stock price and reputation have both suffered in the wake of the Philadelphia Starbucks arrest incident. Shutting down Starbucks stores is the kind of strong response from Johnson that might help restore the shaken trust and confidence between Starbucks, its customers, its employees, and its investors.