Halifax Bank has been hit with a £6.6m bill after it made mistakes in calculating mortgage payments for 40,000 customers between 1979 and 1989.
The mistake originates from the failure of a computer system used by Leeds Permanent Building Society, which was bought by Halifax in 1995.
The system failed to take account when calculating interest payments of customers who either paid extra amounts or who took temporary payment holidays from home loans under the Leeds Permanent interest-only mortgage brand.
About 70 per cent of the borrowers affected did benefit, paying too little interest by on average £175 each. But in 3,000 cases, customers have been overcharged interest.
Halifax, which sent cheques to these customers yesterday, said the average overcharge was £50, but in some cases customers were entitled to compensation of between £5,000 and £6,000. Compensation includes an ex-gratia payment to take account for interest customers would have received if the overpayment had been saved in a bank account.
Paul Duffin, head of mortgages at Halifax, said: "Our objective is to return every penny to customers who have been overcharged but we are waiving all underpayments."
Halifax, the UK's largest mortgage provider, which merged with Bank of Scotland last month, said the problem did not affect any of its other mortgage business.
As well as compensating Leeds customers who still hold their mortgage, Halifax is trying to contact past customers. Any compensation that is not claimed within three years will be donated to the Halifax Charitable Foundation but customers who come forward after this time will also be reimbursed.
Halifax, which has 2.5 million mortgage customers, went on an offensive earlier this year to increase further its share of the mortgage market by introducing a second lending rate to pull in new customers.
But it ran into trouble last month with the financial ombudsman over the policy, which ruled that customers whose loans were pegged to the old standard variable rate should have been transferred to the new one. Halifax is currently appealing against the decision.
£ Customers who think they might have been affected by Halifax's calculation error can call 0845 604 1280.