WASHINGTON — Federal agents notified more than 3,000 U.S. companies last year that their computer systems had been hacked, White House officials have told industry executives, marking the first time the government has revealed how often it tipped off the private sector to cyberintrusions.

The alerts went to firms large and small, from local banks to major defense contractors to national retailers such as Target, which suffered a breach last fall that led to the theft of tens of millions of Americans’ credit card and personal data, according to government and industry officials.

“Three thousand companies is astounding,” said James Lewis, a senior fellow and cyberpolicy expert at the Center for Strategic and International Studies. “The problem is as big or bigger than we thought.”

The estimated cost to U.S. companies and consumers is up to $100 billion annually, analysts say.

The alerts follow a February 2013 executive order by President Barack Obama to “increase in volume, timeliness, and quality” the cyberthreat information shared with the private sector so people can better defend themselves.