Ulster Bank is to pay around €36m in refunds and compensation to business customers who were overcharged interest over the past six years.

The bank said an error affected up to 18,000 loan and overdraft accounts, connected to around 15,500 individual customers.

It will result in an average refund of less than €2,000 per account, which will be issued between September and March 2019.

The error arose after the bank changed the way it calculated its cost of funding in 2012, which led to an increase in the interest rate it levied on business customers.

However an investigation last year, prompted by the tracker mortgage overcharging scandal, found that some customers had not been moved to a contract that allowed for such a change, and as a result should have been kept on the old rate.

Ulster Bank said the overcharge saw customers pay around 0.30% more per year in interest since 2012. The money the bank now plans to issue will include the amount overcharged as well as interest.

The bank will now begin writing to customers, with repayments due to commence in September. Customers are told they do not have to take any action, however those with a query can contact its customer service team online or at 1800 719 874.

Ulster Bank said it intended to have issued refunds to 75% of cases by the end of this year, with the remainder due to be completed within the first three months of 2019.

The refunds will include Ulster Bank customers who have since had their loans sold to another institution, though it says that its refund will only reflect the period that the account was on its books. Any ongoing issue relating to the interest rate they are charged is a matter between the customer and the new loan owner, it said.

"We sincerely apologise to our customers for this," said Eddie Cullen, Ulster Bank's managing director of commercial banking. "Although this will take time to fully resolve, we recognise that full resolution is essential for customers and in building their trust in Ulster Bank."

The Central Bank said it was aware of the issue but could not comment specifically on its interactions with Ulster Bank.

"The Central Bank expects all firms to have adequate systems and controls in place and where issues that impact customers arise, they should be addressed and rectified, with the overarching objective of protecting consumers’ interests, including ensuring that they are not left out of pocket," it said in a statement.