Around 100,000 ANZ bank loan customers have been charged the wrong amount of interest after the bank made incorrect calculations.
The country's largest bank launched a loan interest calculator in March 2015 on the back of changes to consumer lending legislation.
The loan calculator was used to calculate customer repayments and loan terms when customers asked for changes to their loans for home, personal and commercial loans.
But a year later it discovered a fault which meant people had been underpaying interest.
A spokesman for ANZ said it found out in June 2016 there was an error in the calculator's code which meant it had left out some interest customers were due to be charged after their loan was changed.
"We implemented a correct, independently tested calculator in May 2016."
But the bank didn't report the problem to the Commerce Commission until June 2017.
The ANZ spokesman said it needed to understand the issue properly before it could put it right.
"This involved understanding who was impacted and how – which involved asking Deloitte to review this with us – and developing a plan to put things right for any impacted customers.
"Once we had a clear picture of what had happened, how our customers were affected and how we would put it right, we contacted the Commerce Commission."
He said the bank had been openly engaging with the regulator as it worked through the issue.
The bank spokesman said no customers would be out of pocket from the fault and it was in the process of crediting around $10m back to customers.
"We don't want any customers to be disadvantaged by this, so, we're crediting some interest back to customer's loans.
"This means customers will pay less than what they had agreed to under their loan agreement with us. We're putting customers back into the position they would have been if the error in the calculator hadn't happened, with ANZ wearing the cost while their loan was impacted."
The bank said similar problems had occurred overseas and some banks had required customers to pay back the amounts they had underpaid.
"We think our approach in this situation, which gives a credit to clear anything underpaid while the loan was impacted, is fairer to customers."
But the problems remains under investigation by the regulator.
A Commerce Commission spokesman confirmed the bank reported the issue to it in June 2017 and it was still investigating it.
"We have an open investigation into the matter and cannot comment further at this time."
Revelations of the problem come just days after the banks were ordered by the New Zealand regulators to prove they are clean after damning revelations have emerged from Australia's Royal Commission into misconduct in the financial services industry.
The Financial Markets Authority and the Reserve Bank have told New Zealand's banks they have until May 18 to respond to its request for written proof they are different to the Australian banks.