Shares of Dollar General (NYSE:DG) recently dipped after it posted a mixed fourth quarter. The discount retailer's revenue rose 8.5% annually to $6.65 billion, beating estimates by $40 million. Its same-store sales climbed 4% for the quarter and 3.2% for the full year.

Reported earnings per share fell 30% to $1.84 and missed estimates by a nickel. But excluding some big tax benefits from the prior-year quarter, its EPS went up 24% annually. Disaster-related expenses notably reduced its reported earnings by $0.04.

A woman smiling while standing next to a full shopping cart

Image source: Getty Images.

Dollar General expects its same-store sales to jump 2.5% in fiscal 2020, its revenue to grow 7% to $27.4 billion, and for its EPS to climb 7% at the midpoint to $6.30-$6.50. Analysts had expected $27.5 billion in revenue and earnings of $6.65 per share.

Investors were clearly disappointed in Dollar General's earnings miss and soft guidance, but does the stock's post-earnings dip represent a buying opportunity?

The key facts

Dollar General is different from its top rival, Dollar Tree (NASDAQ: DLTR), in two main ways. First, Dollar General opens its stores in rural areas while Dollar Tree (and its subsidiary Family Dollar) focus on urban and suburban areas.

Second, Dollar General isn't a "true" dollar store, where everything costs less than a buck. Most of its products cost less than $10, which is comparable to the prices at Family Dollar. Dollar Tree still sells everything for a dollar or less.

Dollar General, Dollar Tree, and Family Dollar all face two major headwinds -- tariffs on Chinese products and competition from discount superstores like Walmart. Amazon.com also launched a "$10 and under" section for its marketplace last year.

Check out the latest earnings call transcript for Dollar General.

The key numbers

Dollar General struggled with peaking store traffic throughout most of fiscal 2018, but it offset that weakness with bigger average transactions per customer. However, customer traffic and average transactions both rose during the fourth quarter, thanks to the early release of government SNAP assistance (formerly known as the Food Stamp program) for low-income households.

That tailwind -- along with robust demand for its consumables, seasonal products, and home goods -- offset softer sales of apparel and lifted Dollar General's same-store sales to its highest levels for the year:

Metric

Q4 2017

Q1 2018

Q2 2018

Q3 2018

Q4 2018

Same-store sales

3.3%

2.1%

3.7%

2.8%

4%

Data source: Dollar General quarterly reports.

Dollar General also continued to open new stores to bolster its sales growth. During fiscal 2018, it opened 900 new stores, remodeled 1,050, and relocated 115 to finish the year with 15,370 locations. In 2019, it plans to open 975 new stores, remodel 1,000 mature stores, and relocate 100 other locations. In other words, Dollar General remains unscathed by the so-called retail apocalypse that caused many retailers to shutter their stores.

A hand pushing a shopping cart.

Image source: Getty Images.

Dollar General's top-line growth looks healthy, but its gross margins contracted year over year during the fourth quarter.

Metric

Q4 2017

Q1 2018

Q2 2018

Q3 2018

Q4 2018

Gross margin

32.1%

30.5%

30.6%

29.5%

31.2%

Data source: Dollar General quarterly reports.

Dollar General attributed that decline to higher markdowns, lower initial markups on inventory purchases, an increase to its LIFO (last in, first out) provision, and higher sales of lower-margin consumables.

However, tighter spending still boosted Dollar General's operating profit 2.4% annually. Though it didn't provide any full-year guidance for its gross margin, it expects its operating profit to improve 4%-6%. It also expects to repurchase $1 billion in shares, which is equivalent to about 3% of its current market cap.

Dollar General's guidance is based on the expectation that the government won't hike its tariffs on Chinese products again. Tariffs remain an unpredictable headwind for the company, but its decision to proactively purchase more inventory at the end of 2018 could insulate it from near-term trade issues.

Still a good bear market-friendly bet

Dollar General's core business is strong, it's expanding while other brick-and-mortar retailers are retreating, its stock looks cheap at 16 times forward earnings, and it pays a 1% dividend. It's also a recession-resistant company that usually generates higher sales during economic downturns.

Its earnings miss, gross margin contraction, and softer-than-expected guidance in the fourth quarter were disappointing, but I think analysts may have set the bar a bit high. Therefore, I think Dollar General looks fairly attractive after its post-earnings dip.