Costco's (COST  ) latest promotion was more wonky than Wonka.

What Happened: The wholesale retailer is known for its bulk deals on household essentials, Kirkland-branded goods as well as the affordable, food court hot dog and soda combo.

But lately, one of its hottest items has been something you typically wouldn't find in the same store where you buy your toilet paper - gold bars.

Costco began selling one-ounce gold bars in September. More than $100 million worth of the bars were sold over the last three months, according to the company's earnings call last week.

Costco sold the bars for $1,950 a piece - slightly higher than the spot price of the precious metal.

It's implied that Costco was making a slight profit on each bar sold, but based on the gold prices at the time, the margins were not that large.

Why It Matters: The price of gold hovered around $1,900 an ounce in September.

Since then, gold prices have traded higher by more than 6%.

Had Costco held onto the 50,000 bars, it would have made more money through the appreciation of the gold compared to its profits from selling it off to members.

On the other hand, Costco could increase its brand value and customer loyalty by being able to offer such items - a marketing ploy you'd likely not find at competitors such as Walmart Inc (WMT  ) and Target Corp (TGT  ).

After all, Issaquah, Washington-based Costco is in the business of selling goods to consumers and not trading precious metals.

Since September, Costco has raised the price of its gold bars to slightly more than $2,000 a bar. So next time you're at Costco and you feel like splurging, remember that you could be going home with your own piece of gold.