Wholesale-retailer Costco (COST 1.01%) and Okta (OKTA 1.21%), a company that helps companies manage their users' logins and permissions, stole the show in after-hours trading on Thursday. Following the release of their latest quarterly results, Costco shares jumped and Okta stock pulled back.

Here's what's moving these stocks.

A shopping cart in the aisle of a wholesale store.

Image source: Getty Images.

Why is Costco trading higher?

Wholesale-club retailer Costco impressed investors after market close when it reported strong fiscal second-quarter results.

The company's net sales jumped 7.3% year over year, to $34.6 billion. This sales growth was driven by a 7.2% year-over-year increase in U.S. same-store sales when excluding the impacts of gasoline prices, foreign exchange rates, and an accounting change related to revenue recognition. Adjusted same-store sales, when consolidated to include all of the company's markets, were up 6.7%. 

The company's net income soared from $701 million in the year-ago quarter to $889 million. This translates to earnings per share of $2.01, up from $1.59 in the year-ago quarter.

The company's second-quarter earnings per share of $2.01 blew past a consensus analyst estimate for $1.69, highlighting why investors reacted so optimistically to the report. Shares were up nearly 5% in after-hours trading as of 5:45 p.m. EST.

Check out the latest earnings call transcripts for Costco and Okta.

Why is Okta trading lower?

Enterprise identity-management company Okta also reported strong quarterly results, beating analyst estimates for both its top and bottom lines. But the company whiffed when it came to its guidance for its first-quarter and full-year loss per share.

Okta's revenue for its fourth quarter of fiscal 2019 surged higher, climbing 50% year over year, to $115.5 million. Subscription revenue was $108.5 million -- up 53% year over year. In addition, the company's non-GAAP net loss importantly narrowed from $0.08 in the year-ago quarter, to $0.04.

Both of these figures easily beat analyst forecasts. On average, analysts expected revenue of $108 million and a non-GAAP loss per share of $0.08.

Management said it benefited during the quarter from a 50% year-over-year increase in customers, with over $100,000 in annual recurring revenue. "Large customers are increasingly turning to Okta as the identity standard for both their workforce and customers," said Okta CEO Todd McKinnon.

Looking ahead, management said it expects fiscal first-quarter revenue between $116 million and $117 million, representing 39% to 40% year-over-year growth. Analysts were expecting Okta to guide for 34% revenue growth. But Okta said it expects a fiscal first-quarter non-GAAP loss per share between $0.22 and $0.21, worse than analysts' consensus estimate for a loss of $0.12 in Q1. The company also forecast a big loss for the full year, guiding for a non-GAAP loss per share between $0.53 and $0.48 -- worse than the company's $0.32 loss per share in fiscal 2019.

Okta stock was down nearly 7% in after-hours trading as of 6:12 p.m. EST.