Dollar store chains Dollar Tree (DLTR  ) and Dollar General (DG  ) both beat consensus estimates for Q1, with share prices well above the projections for the quarter. The exceptional performance of the two companies is primarily attributed to the national economic slump that came as a result of the coronavirus pandemic.

Dollar General came in at a quarterly profit of $2.56 per share, almost a dollar over the consensus estimate of $1.74. Dollar Tree meanwhile reported earnings of $1.04 per share, coming in above the consensus estimate of just 85 cents. Dollar General, which has a substantial presence in 46 states, reported an increase in same-store sales throughout the first quarter to the tune of 27.6%. Dollar Tree reported a more modest increase in same-store sales of 7%, while the company's Family Dollar subsidiary reported a more significant increase of 15.5%.

The economic downturn that came with the global shutdown to limit the spread of the novel coronavirus can be attributed to the surge in sales for the dollar store chains. Millions of Americans left unemployed temporarily or permanently by the pandemic have had to make what savings they have and what they may receive in unemployment (if anything) last a considerably long time. Having essential grocery items at lower prices than even chains such as Walmart (WMT  ) helped drive the success of both stores, especially Dollar Tree, which offers all products at a dollar each.

"That we have seen an increase in customers is no surprise. Right. When the going gets tough we know that our customers need us more. But we also know from past recessionary times that we have a customer that also starts to trade into Dollar General. We saw that in a very big way," said Dollar General CEO Todd Vasos in an earnings call.

Dollar General's success, however, was unprecedented even for the rising number of consumers dealing with less household funds. "Having products that are much in demand is one thing, but it doesn't fully explain why Dollar General grew at a much faster pace than the groceries market overall," says Neil Saunders of GlobeData Retail. Dollar General's success mostly came down to location; Dollar General stores are strategically placed to be far from competitors in underserved communities. According to GlobeData Retail, 75% of the population is within five minutes of a Dollar General, compared to 37% who are within five minutes of a Walmart-being close to underserved communities struggling economically amid the pandemic more than explains Dollar General's monumental success that surpassed even Walmart, which has also fared the pandemic well financially.