Twitter could turn its first ever profit in the fourth quarter, after making sweeping cuts in expenses and finding sources of revenue beyond the ads that dominates social media.
Twitter also disclosed in its quarterly earnings report that it had discovered an error in the way it had calculated the size of its user base since 2014 and revised its estimates downward.
But it said that the difference amounted to less than 1%.
Twitter reported third-quarter revenue of $590m, down 4% from $616m a year earlier.
The company attributed much of the decrease to a previously announced decision to wind down its TellApart advertising product.
Analysts on average had expected revenue of $587m, according to Thomson Reuters.
The company said it had 330 million monthly active users in the quarter that ended on September 30, up 4 million from a quarter earlier.
The increase came on the back of greater use of email and push notifications to point people toward tweets they want to read.
In the US, where growth had stalled earlier this year, the number of users rose to 69 million from 68 million, the company said.
Analysts on average had expected 330.4 million monthly active users worldwide and 69 million in the US, according to financial data and analytics firm FactSet.
Twitter said the error in past user estimates was caused when it wrongly counted people who logged into applications associated with the company's Fabric software platform, which Twitter sold this year to Alphabet's Google.
Investors and analysts have at times criticised Twitter for how it describes the size of its user base, which is a key metric for social media companies. Unlike Facebook, Twitter does not disclose how many daily active users it has.
The company's chief executive Jack Dorsey said in a statement that the business was making progress growing its audience and returning to revenue growth.
"We're proud that the improvements we're making to the product continue to bring people back to Twitter on a daily basis," he said.
Twitter's net loss narrowed to $21m, or 3 cents a share, compared with $103m, or 15 cents per share, a year earlier.
Twitter has never had a profitable quarter based on generally accepted accounting principles (GAAP), but it said today "we will likely be GAAP profitable" in the fourth quarter if it reaches the high end of its own estimates.
Helping to improve Twitter's margin was a 16% cut in expenses from a year earlier.
Twitter has struggled to convert its appeal among celebrities and public figures such as US President Donald Trump to attract users and advertisers away from competitors including Facebook and Snapchat.
The company has stepped up efforts to keep people hooked through live-streaming deals, including broadcasts of concerts, professional golfing events and news programmes.
Last month, Twitter began a test of tweets that are as long as 280 characters, double the existing cap, to allow people to better express themselves.
The company also is diversifying its revenue further beyond advertising. Revenue from data licensing and other sources was $87m in the third quarter, up 22% from a year earlier
Twitter also said that it had signed "a significant number of new enterprise deals" in the quarter.
The most recent quarter was the third time revenue has declined since Twitter's debut as a public company in 2013, as two of Silicon Valley's giants, Facebook and Google, have come to dominate the business of internet ads.
Twitter's letter to shareholders made no mention of a regulatory challenge facing the company in the US, where lawmakers are investigating how Russia used social mediat o interfere in the 2016 US election.
Twitter has pledged to make political advertising more transparent on its service. Russia has denied any interference.
The company has announced plans to toughen its rules on online sexual harassment, seeking to limit the number of bullies and abusers on the social network.