Dropbox Inc. earned more cash from each user and grew its paying-customer base in the third quarter, according to a Thursday earnings report, as the company continued to narrow its losses and grow sales faster than Wall Street’s expectations.

Shares of Dropbox DBX, -1.08%  closed down 1.1% in Thursday trading and gained between 5% and 9% in immediate after-hours trading following the release of the report. After the company issued its fourth-quarter and full-year guidance on the earnings call the stock was trading up roughly 8%.

Third-quarter net losses were $5.8 million, which amounts to 1 cent a share, narrowing from losses of $14.1 million, or 7 cents a share, in the year-ago quarter. Adjusted for items such as stock-based compensation, Dropbox reported profit of $45 million, or 11 cents a share, compared with adjusted net income of $23.5 million, or 7 cents a share, in the year-earlier period. Wall Street analysts expected adjusted earnings of 6 cents a share, according to FactSet.

“[Third quarter] was another strong quarter of revenue growth and margin expansion,” Dropbox Chief Financial Officer Ajay Vashee said to MarketWatch after the company released earnings.

The San Francisco-based company’s revenue grew to $360.3 million, 26% growth compared with the year-ago quarter and ahead of the average analyst estimate of $352.8 million, according to FactSet. Vashee said the top-line growth was driven by continued paid-user conversions and the additional revenue it was able to generate from each customer.

On the earnings conference call, Dropbox said it expects fourth-quarter sales of $367 million to $370 million. According to FactSet, Wall Street expected revenue of $363.7 million. Dropbox said it was raising its full-year guidance from a range of $1.36 billion to $1.37 billion, to $1.38 billion to $1.39 billion. The FactSet consensus for was full-year sales of $1.37 billion.

Revenue growth decelerated to 26% from the 27% Dropbox reported after the June quarter this year. Free cash flow was $120 million and gross margins widened to 75.9% from 68.1% the year before. “It’s really the strength of our business model and our go-to market,” Vashee said. “It’s because 90% of our revenue is self-serve and it’s generated through these efficient customer acquisition channels that we’re able to generate such high free-cash-flow margins.”

On the earnings conference call, Dropbox said it was increasing its free cash flow guidance for the full year to $350 million to $360 million.

“We’re fully funding all the initiatives across marketing, all the initiatives across research and development and all of the initiatives across product that we believe are important to drive long-term growth for the business,” Vashee said to MarketWatch over the phone.

By the end of the September quarter, Dropbox had 12.3 million paying customers, an 18% increase from the year-earlier quarter. Vashee said its paying customer base is driven by conversions to its individual and team plans. “It’s driven by investments in that data-science-driven conversion engine and by investments in our go-to-market efforts with [sales channels],” he said.

Unlike many of its peers, Dropbox attracts new customers through its self-serve products that rely on word of mouth, among other things to draw in new customers. The company then determines whether or not — via data science and other techniques — the self-serve accounts merit a direct sales call to an organization that has reached a critical mass of users.

Dropbox said that each customer was worth more, as average revenue per customer was up to $118.60 from $112.05 in the same quarter last year. In the past, the company has said it has over 500 million registered users and about 300 million of those are potential paying customers.

Vashee says there are three things that kept per-user revenue ticking up during the quarter: More people are paying for the company’s premium products, customers have been grandfathered into some of the company’s advanced plan offerings are now renewing their subscriptions, and the company is selling more team-type licenses.

“They have been the drivers over the past couple of quarters and they continue to the be drivers now, as well,” Vashee said.

Opinion: The tech IPO market is back, thanks to boring, old cloud-software companies

During the last quarter, Dropbox launched an updated search engine it calls Nautilus, which takes advantage of machine learning. It also introduced technology it calls optical character recognition that lets users search scanned or saved images for text.

Dropbox went public earlier this year and priced its stock at $21, above the expected range. It raised more than $750 million at an initial market valuation of $8.24 billion. The company was founded in 2007 and raised more than $600 million in private cash. Prior to Dropbox’s initial public offering, it moved its cloud storage from Amazon.com Inc.’s AMZN, -0.03%  AWS to a system of its own design, which has benefited the company’s bottom line.

In the past three months, Dropbox shares have fallen 21% as the S&P 500 index SPX, -0.25%  fell 1.5%.