Praise be to Allaah.
We praise Allaah for having guided you, and we ask Allaah to make you steadfast and know that Allaah is Forgiving and Most Merciful. He rejoices over the repentance of His slave, even though He has no need of His creation. We ask Allaah to bestow more of His bounty upon you.
You have to pay the zakaah of the past years according to the amounts of money that you possessed after paying off the debts of each year. Once you arecertain about the amount in any year, then you have to pay zakaah on it. If you do not know the exact amounts, then guess and pay based on that estimate.
Shaykh Ibn ‘Uthaymeen (may Allaah have mercy on him) was asked:
A man was careless about paying zakaah for five years, and now he is repenting. Does repentance free him of the obligation to pay zakaah? If it does not free him of that obligation, then what is the solution? This wealth is more than ten thousand and he does not know how much it is now.
Zakaah is an act of worship towards Allaah and it is the right of the poor. If a person withholds it, then he is violating two rights: the right of Allaah and the right of the poor and others who are entitled to zakaah. If he repents after five years – as stated in the question – then he is absolved of the obligation to fulfil the right of Allaah, because Allaah says (interpretation of the meaning):
“And He it is Who accepts repentance from His slaves, and forgives sins”
But the second right still remains, which is the right of those who are entitled to zakaah, the poor and others. So he has to hand over the zakaah to these people, and perhaps he will attain the reward for zakaah if his repentance is sound, for the bounty of Allaah is immense.
With regard to working out the amount of zakaah, he should estimate the amount of zakaah as best he can, and Allaah does not burden any soul beyond its scope. So if it is ten thousand, for example, how much is the zakaah for one year? Two hundred and fifty. If the amount of zakaah is two hundred and fifty, then he should pay two hundred and fifty for each of the past years, unless in some of those years he had more than ten thousand, in which case he should pay extra. If it was less in some years, then he should pay less zakaah, accordingly.
As’ilat al-Baab al-Maftooh, Q494, session 12
And Allaah knows best.