Dollar General's (NYSE:DG) ability to keep its stores open during the pandemic, and selling the basic items like paper towels, milk, and eggs that people needed, has benefited the company during this crisis. The discount retailer's results for its fiscal first quarter, which ended on May 1, partly reflect that: Same-store sales rose 21.7% and diluted earnings per share shot up by 73% year over year to $2.56.

It's no wonder that while many stocks remain at levels below where they started the year, this one's share price is up by 27%. However, it wasn't just the pandemic that caused its surge in sales. There are several contributing factors that led me to the firm belief that Dollar General will keep posting strong sales and earnings growth, even if not at last quarter's rates.

A woman with a full cart is looking at an item.

Image source: Getty images.

Recessions draw customers

Results weren't strong merely because Dollar General's stores were open while some other retailers were not. As CEO Todd Vasos, stated on the fiscal first-quarter earnings call:

When the going gets tough, we know that our customers need us more, but we also know from past recessionary times that in times [like] these that we have a customer that also starts to trade into Dollar General. We saw that in a very big way in Q1.

The company draws people to its stores through its merchandise and its prices, which are typically $10 or less. The consumables category encompasses paper goods, cleaning products, packaged foods, perishables (e.g. milk and bread), health and beauty (items such as soap and shampoo), and pet merchandise. Those necessities represented 78% of last year's sales, and they are things people will buy no matter the state of the economy. But in more difficult times, more of them are more likely to shift some of their business to Dollar General since it charges less than many other retailers.

For an indicator of what the company could be looking forward to, it can be helpful to look back to the last time the economy was troubled. During the Great Recession, Dollar General's comps growth accelerated from low-single-digit percentages to 9% and 9.5% in 2008 and 2009, respectively.

Admirable consistency

Dollar General doesn't just do well in recessions. For 30 straight years, it has posted positive comps, which is quite an achievement for a retailer. In just the last five years, diluted earnings per share have gone from $3.95 to $6.64 in 2019.

It also keeps increasing the number of stores it has in operation. Over the same period, management has increased the total from about 12,500 to nearly 16,300. Even this year, in the face of the pandemic, it plans on opening 1,000 stores, in line with its expansion rates of the past few years.

Dollar General has shared these gains with shareholders; the board of directors has steadily raised the stock's dividend since it initiated it with a $0.22 quarterly payment in 2015. This includes a $0.04 per share hike in April to $0.36 a quarter. The company's payout ratio is just 17%, so it is entirely sustainable.

At a price-to-earnings ratio of 26, the shares are not cheap. But, considering its growth prospects and ability to produce sales and earnings growth in both good and bad economic environments, it's a reasonable price to pay.