Wells Fargo has apologized on Friday for a error they made that caused hundreds of customers to lose their homes over a five-year period.

The San-Francisco based bank claimed that a calculation error utilizing the company's mortgage underwriting tool caused 625 customers to be effected.

Those customers where wrongly denied access to modifications that would make their loans more affordable. 400 of those cases resulted in actual home foreclosure, the Charlotte Observer reports.

The San-Francisco based bank claimed that a calculation error utilizing the company's mortgage underwriting tool caused 625 customers to be effected. 400 of those cases resulted in actual home foreclosure (protest from 2013 - during the middle of the five year period)

The error was finally fixed in October 2015 but had been in existence for five years, first reported in April 2010.

An internal review led to the finding of the error, according to the bank.

'We're very sorry that this error occurred and are providing remediation to the approximately 625 customers who may have been impacted,' spokesman Tom Goyda asserted in a statement

Wells Fargo had claimed that they set aside $8million to address the customers' troubles.

'We're very sorry that this error occurred and are providing remediation to the approximately 625 customers who may have been impacted,' spokesman Tom Goyda asserted in a statement.

He could not clarify where the customers were from, however.

On Friday, the bank revealed that they were being probed by federal agents looking into how they were able to buy federal low-income housing tax credits in summation with financing low-income housing developments.

Further details pertaining to the investigation were not released.

With its main corporate office in San Francisco, the bank employs thousands in Charlotte.

Wells Fargo agreed Wednesday to pay a $2.1 billion fine to settle allegations it misrepresented the types of mortgages it sold to investors during the housing bubble and subsequent financial crisis.

The amount is relatively smaller than the fines paid by Bank of America, Citigroup, Goldman Sachs and other big banks in the years following the financial crisis to settle similar allegations. Wells Fargo is one of the last remaining big banks to settle charges related to its role in the subprime mortgage crisis.

Wells Fargo agreed Wednesday to pay a $2.1 billion fine to settle allegations it misrepresented the types of mortgages it sold to investors during the housing bubble and subsequent financial crisis

The fine is unrelated to the more recent scandals that have plagued Wells, such as the opening of millions of fake accounts for customers without their authorization in order to meet unrealistic sales quotas.

The government accused Wells and many other big banks of understating the risk and quality of the mortgages they sold to investors at the height of the housing bubble, between 2005 and 2007. These investors bought up tens of billions of dollars in mortgages from Wells and other banks, and experienced massive losses when borrowers failed to repay and housing prices collapsed nationwide.

Bank of America paid a $5 billion fine to authorities in 2014 for similar allegations, and Citigroup paid a $4 billion fine.

Wells Fargo said in a statement it was "pleased to put behind us these legacy issues" and said it had previously set aside the money to cover the settlement with the Justice Department.