A new rule aimed at protecting retirement funds will result in up to $31.5 billion in compliance costs for the brokerage industry over the next decade but produce even bigger gains for retirees, the U.S. Labor Department said on Wednesday.

In its final fiduciary standard rule released on Wednesday, the Department predicted industry compliance costs of between $10 billion and $31.5 billion over the next 10 years.

Individual retirement account investors will gain between $33 billion and $36 billion over the next decade as a result of the rule, and between $66 billion and $76 billion over the next 20 years, the Department said.