Costco (COST 0.17%) has been one of the success stories of the otherwise troubling coronavirus pandemic. The warehouse club remains open, and while it has had to modify its operations to accommodate social distancing, its business has been bigger than ever.

The chain added $1.5 billion in March sales as members looked to keep their houses stocked with food, toilet paper, and other essentials. That has helped the retailer's stock remain near its 52-week high of $325.25, closing at $312.08 on April 20.

Costco has been flying high during difficult times. Does that make it a smart buy for your stock portfolio?

The exterior of a Costco.

Costco has seen its sales spike due to the coronavirus pandemic. Image source: Costco.

A look at Costco's numbers

Sales don't tell the real story for the membership-based chain. Costco makes roughly two-thirds of its profits selling memberships. It takes very low margins on the goods it sells to keep prices as low as possible for members. Still, rising sales are a sign that members are happy, and the chain's second-quarter numbers were very strong.

Earnings came in at $931 million or $2.10 per share, up from $889 million or $2.01 per share during the same period in 2019. Net sales were $38.26 billion, a 10.5% increase from $34.63 billion realized last year.

Sales may not be the key metric for the company, but those numbers -- which are pre-coronavirus -- suggest that membership has grown and that members are buying.

Comparable sales were also up 8.9% and digital sales were up by 28.4%, compared to the same quarter in 2019. In addition, members spent more on each trip, with the size of each transaction rising by 2.9%.

Renewal rates came in at 90.9% for the U.S. and Canada and globally at 88.4%, right where they have been for the past two quarters, CFO Richard Galanti said during the second-quarter earnings call. Membership growth was also strong.

"At the end of the second quarter, we had 55.3 million member households, up about 600,000 from the 54.7 million 12 weeks earlier," he said. "And total cardholders totaled 100.9 million, up about 1 million from the 99.9 million we reported at the end of the first quarter."

The chain also increased the numbers of Executive memberships. These cost twice as much ($120) but offer 2% back (up to $1,000 annually) on most purchases, as well as some added discounts on services.

"At Q2 end, paid executive memberships stood at 21.7 million members, an increase of 321,000 during the 12 weeks or about 27,000 per week increase since Q1 end," Galanti added.

Costco planned no new warehouse openings in Q2. It had two planned for the third quarter and 11 to 13 planned for Q4. All of those could be delayed by the need to account for the coronavirus.

Is Costco stock a buy?

Costco isn't sexy. It's generally not an innovator because it doesn't have to be. Its members want low prices and the warehouse club does an excellent job of giving them that.

The company does not grow quickly, but it grows steadily. It adds members every quarter in numbers similar to Q2, and it opens 20 new locations each year. Costco has also been generous in rewarding shareholders with a quarterly dividend, which it just raised from $0.65 a share to $0.70. It has also paid special dividends on three occasions, and Galanti suggested in an earlier earnings call that the chain could do that again.

Costco paid a special dividend of $7 a share in 2012. It followed that by paying $5 a share in 2015 and $7 per share in 2017. No promises have been made about paying another one, but it's very possible.

It's hard to find a safer stock to put in your portfolio. Costco offers slow but steady growth and a dividend, and it has shown it can weather very tough times (and it has almost certainly added members during the pandemic). This may not be a quick gainer for you, but it deserves a place in your portfolio and should be considered a buy.