All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
If this money reaches the Nisaab (the minimum amount liable for Zakah) by itself or by adding to it other sums of money or trading goods, and then one lunar year has elapsed while the money is sustaining the Nisaab, Zakah is due on this money.
As for your debt, if you have another amount of money that you do not have to pay Zakah on and which exceeds your basic needs, keep it for repaying the debt and give Zakah on the other amount on which Zakah is due.
What is intended by your basic needs are the house, clothing, and means of transport that befit the like of you.
If, however, you do not have another amount to allocate for repaying your debt, then yours is one of the two following cases:
The debt may, or may not, cause the money to go below the Nisaab, if repaid out of it. If it does not decrease the money below the Nisaab, Zakah is due on the rest of the money after removing the debt. In a Hadeeth on the authority of ‘Uthmaan, may Allah be pleased with him, the Prophet, sallallaahu ‘alayhi wa sallam, said: "This is the month in which Zakah is due on your money; if any of you is indebted, let him repay his debt and then give Zakah." [Maalik in Al-Muwatta’, Ash-Shaafi‘i, Ibn Abi Shaybah, Al-Albaani: Saheeh].
However, if the debt decreases the money below the Nisaab, the majority of scholars hold the view that debt removes the duty of Zakah on Al-Amwaal Al-Baatinah (hidden wealth) – gold, silver money, and trading goods – not Al-Amwaal Al-Thaahirah (apparent wealth), such as plants, fruits, and cattle; this is the opinion of Abu Haneefah, Maalik, and Ash-Shaafi‘i.
So, if the debt causes the money to decline below the Nisaab or consumes all of it, no Zakah is due on this money.
Allaah Knows best.