It is irrelevant to the calculation

Q: Must a farmer pay Zakah on a harvest of grains if they take out a loan from an agricultural bank and the value of the harvest is not sufficient to pay back the loan or the installments that are due?

A: Zakah is due on grains, such as wheat and the like, if they reach the Nisab (the minimum amount on which Zakah is due). The Nisab for grains is 5 Wasq - and one Wasq equals 60 Sa`s (equal to 130,320 kg) - at the time of harvesting. Thus, if the harvest reaches this Nisab, the farmer must pay Zakah on it even if they are indebted to an agricultural bank or any other bank. (Part No. 9; Page No. 190) May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.