WASHINGTON — The Internal Revenue Service said Monday that hackers had gained access to the tax returns of more than 300,000 people, a far higher number than the agency had reported previously.

In the coming days, the I.R.S. will send 220,000 letters to taxpayers whose returns were probably viewed by the hackers, the agency said.

The agency had said in May that criminals using stolen data gained access to tax returns for 114,000 people through software called “Get Transcript” that allows taxpayers to retrieve their returns from previous years.

Relying on personal information — like Social Security numbers, birth dates and street addresses — the hackers got through a multistep authentication process. They then used information from the returns to file fraudulent ones, generating nearly $50 million in refunds.