WASHINGTON — Citizens Bank agreed to refund at least $14 million and pay $20.5 million in fines for shortchanging customers who didn’t get the math right on their deposit slips, federal regulators said Wednesday.

The Providence, Rhode Island, regional bank credited an account with the amount on the slip even if it was less than the actual total of cash and checks deposited, regulators said.

In doing so, the bank engaged in “shoddy practices that deprived consumers of money that was rightfully theirs,” said Richard Cordray, director of the Consumer Financial Protection Bureau.

From January 2008 to September 2012, Citizens Bank only investigated and fixed errors if the discrepancy was more than $50. From October 2012 to November 2013, the bank lowered that threshold to $25.

By failing to verify deposits as customers were promised in account disclosures, the bank shorted them of millions of dollars, Cordray said.

“The bank chose to ignore these discrepancies and harmed many consumers by pocketing the difference,” said Cordray, whose agency was alerted to the problem by a whistle-blower.

The consumer bureau, along with the Office of the Comptroller of the Currency and the Federal Deposit Insurance Corp., ordered the bank to refund customers in full and change its practices.

Citizens Bank, which operates in the Northeast and Midwest, said Wednesday that its practices for dealing with mathematical errors “could have been better.” Citizens has more than 20 ATMs in Maine, many in Cumberland Farms and Shaw’s stores. It has branches throughout New Hampshire.

A new system for tellers was implemented in the fourth quarter of 2013 that “is now considered among the best in the industry,” the bank said.

The amounts of money under-credited to customer accounts and over-credited to accounts because of discrepancies with deposit slips “were approximately equal,” Citizens Bank said.

“Customers who were over-credited will keep the excess funds applied to their accounts and customers who were under-credited will be reimbursed,” the bank said.

Cordray said any argument that “it all came out in the wash” because some customers benefited while others were harmed was not correct.

“Many customers lost money that rightfully belonged to them,” he said. “Fifty dollars may seem like a small amount to a bank with assets worth billions of dollars, but it is real money to regular people.”

Ensuring the accuracy of deposits and resolving discrepancies in a timely fashion is a basic function of banking, said Comptroller of the Currency Thomas J. Curry.

At least $11 million in refunds are due to consumers and $3 million to business customers, regulators said. Additional refunds are expected when the comptroller’s office finishes a review of the bank’s practices.

Citizen Bank customers will receive account credits and former customers will receive checks, regulators said.