An urgent investigation has been launched after a software error was discovered in an online form used by divorcing couples in England and Wales.
The error on the Ministry of Justice website had been present since April 2014 but has only just been uncovered.
The issue with the form, which records couples' financial details, could mean thousands of financial settlements are based on incorrect calculations.
Her Majesty's Courts and Tribunal Service is to contact those affected.
The mistake was in Form E on the Ministry of Justice (MoJ) website and it was rectified earlier this month. Not all couples use the online form, as some do submit their calculations on paper.
The mistake could mean some of those who have settled divorces in the past 20 months could have to re-open negotiations.
BBC legal correspondent Clive Coleman said it was not yet known how many people were affected, but that there are 120,000 divorces in England and Wales each year.
He said: "Paragraph 2.20 of Form E, which is supposed to produce totals by adding assets and subtracting liabilities, has failed to take account of the liabilities entered earlier on, resulting in an error which inflates the party's wealth by ignoring their debts.
"If the error is not spotted and corrected the false figures will lead to incorrect and unfair settlements.
"That means that judges may have approved thousands of financial settlements and payment orders based on false figures.
"Unless the parties to the settlement accept these 'incorrect' settlements, they will have to be re-opened, presumably at the expense of the Ministry of Justice or the lawyers and professional advisors who failed to double check and pick up the errors."
The Guardian reported that Nicola Matheson-Durrant, of the Family Law Clinic in Berkshire, had spotted the error. She is a McKenzie Friend, a lay expert who assists litigants.
She told the newspaper: "Having discovered the fault and advised the MoJ, it became apparent that not a single solicitor, barrister or judge in the whole of the UK had noticed this error. It is such a critical fault."
A HMCTS spokesman said: "Officials are taking steps to identify rapidly cases where this regrettable error may have had an impact, and we will be writing to anyone affected as soon as possible.
"Anyone concerned about their own court proceedings should contact formE@hmcts.gsi.gov.uk."
Have you used this service? Do you believe you may be affected by this story? Let us know about your experiences. Email firstname.lastname@example.org with your stories.
Please include a contact number if you are willing to speak to a BBC journalist. You can also contact us in the following ways: