Costco Wholesale (COST -0.24%) continues to impress investors with its ability to grow sales, customer traffic, and achieve profitability in an evolving retail landscape. In its second quarter of 2019, the warehouse giant saw net sales rise 7.3% year over year.

Even more illuminating, same-store sales jumped 6.7% over the same time frame when excluding the impacts of gasoline prices, foreign exchange rates, and a new method for revenue recognition. In addition, the company's earnings per share soared from $1.59 in the year-ago quarter to $2.01.

But further insights about the company can be gleaned from its quarterly earnings call earlier this month. Two particularly interesting topics discussed during the call were the company's occasional special dividends and management's thoughts on its gross margin.

A shopping cart going through a wholesale market aisle.

Image source: Getty Images.

There's no simple way to explain Costco's improving margin

Costco's gross margin improved from 10.98% in the year-ago quarter to 11.29% in Q2 of fiscal 2019 -- a 31 basis-point improvement. Excluding gas, currency changes, and Costco's change to revenue recognition, the improvement would have been 30 basis points.

A strong gross margin for the quarter helped Costco deliver much better-than-expected earnings per share for the period, prompting shares to jump after the quarterly results were released.

Unfortunately, there's no predictable and sustainable trend driving this year-over-year improvement. Indeed, Costco CFO Richard Galanti says swings in metrics are driven by a variety of factors.

And there's lots of things that impact it, whether it's freight, tariffs, somewhat to the negative, in some cases not as bad as we thought. I think we've done a great job and we continue to do a great job, particularly in fresh food and organics, where I believe there's a little less pricing pressure or competitive pressure.

Galanti even went as far as warning investors not to get too caught up in trying to predict its gross margin trajectory.

But don't get me wrong. As soon as we have a good quarter in the next quarter, we'll change that. Not that I'm giving any guidance. We know that we keep it pretty steady and we feel pretty good about it, whether it was up a few basis points or down a few basis points.

Check out the latest earnings call transcript for Costco.

What about a special dividend?

Some companies pay out special dividends on top of their regular dividends. Costco is one of those companies. Costco's special dividend, which has been paid out a total of three times, has become quite regular since 2012. Each of these dividends was spaced by 2/14 years.

Now that it's coming up on 2 1/4 years since the company's last special dividend this summer, some investors have speculated the wholesale giant will announce a dividend soon. Indeed, when Galanti was asked about special dividends in the company's first-quarter earnings call of fiscal 2019, the executive noted that Costco continues to generate a lot of excess cash and even said that previous special dividends have "worked well." But Galanti made no promises in that call and no promises in the company's fiscal second-quarter call.

The three we did were about 2 1/4 years apart but that doesn't mean anything going forward. It's still a topic on the table and we continue to talk about it along with other things.

The numbers are certainly looking good for a special dividend sometime this year. But investors shouldn't count on it.