Yahoo! said in a statement that the credentials was stolen in late 2014 by what it claims is a state-sponsored actor.
While Yahoo! was aware that at least 200 million user details were being sold on the dark web in August, it informed Verizon, which agreed to buy Yahoo! in July, of the theft just two days ago, according to a published report.
A reporter from the website Motherboard was told by Yahoo! on 1 August that it was aware of claims that user details were being advertised for sale on the dark web. But it did not put out any public notice of this until 22 September.
The company added that an ongoing investigation indicated that unprotected passwords, payment card data, or bank account information were not stolen.
It said payment card data and bank account information were not stored in the system found to be affected.
"Based on the ongoing investigation, Yahoo! believes that information associated with at least 500 million user accounts was stolen and the investigation has found no evidence that the state-sponsored actor is currently in Yahoo!'s network," it said.
Tim Bentley, managing director of cybersecurity company Proofpoint in Australia and New Zealand, said: "The overnight news that Yahoo! email accounts have been breached reinforces our research that email is the number one most critical risk vector for inbound threats as it provides a direct link between an attacker and victim.
"It's also a critical threat vector for outbound data loss and is the greatest threat to an organisation if employees access their personal email on workplace machines. Attackers can use these compromised accounts to break into some of the world's most sophisticated organisations."
Added Bentley: "If your personal email is compromised, and an attacker assumes your identity, all of your contacts are exposed to an immediate threat by allowing the attacker to reset all of your other account passwords. Email best practices advise you change your passwords frequently and to not use the same credentials across all of your accounts."