There is no zakah on an’aam animals unless they graze on pasture with no expenditure on their food
Question

Is zakah due on sheep that do not graze and money is spent monthly on buying food for them? Is there any zakah on sheep that graze on pasture and herbage and nothing is spent on food for them? I hope that you can explain.
Praise be to Allah.The majority of scholars, including the three imams Abu Haneefah, al-Shaafa’i and Ahmad, are of the view that zakah is not due on an’aam animals (camels, cattle and sheep) unless they graze on pasture and their owner does not feed them. If they are fed [with food that is bought for them] then there is no zakah on them. 
They quoted several texts as evidence, including the following: 
1 – The report narrated by al-Bukhaari (1454) from Anas, that Abu Bakr (may Allah be pleased with him) wrote him the following letter when he sent him to Bahrain: “In the name of Allah, the Most Gracious, the Most Merciful. This is the obligation of zakah which the Messenger of Allah (peace and blessings of Allah be upon him) enjoined on the Muslims and which Allah enjoined upon His Messenger. Whoever among the Muslims is asked to pay it in the proper manner, let him give it and whoever is asked for more than that, let him not give more … With regard to the zakah on sheep in the pasture, if they number between forty and one hundred and twenty, one sheep (is due as zakah)…” 
The fact that the word ghanam (sheep) is further defined by their being described as being in the pasture indicates that there is no zakah on those that are not in the pasture. 
2 – The report narrated by al-Nasaa’i (2444) from Bahz ibn Hakeem from his father, from his grandfather who said: I heard the Prophet (peace and blessings of Allah be upon him) say: “For grazing camels, for every forty an ibnat laboon (a two-year old she-camel)…” Classed as hasan by al-Albaani in Irwa’ al-Ghaleel, 791. 
The fact that the word ibl (camels) is further defined by describing them as grazing indicates that there is no zakah on other kinds. 
Cattle come under the same ruling as camels and sheep. 
See al-Sharh al-Mumti’, 5/33 
Al-Nawawi said in al-Majmoo’: 
The fact that it is limited to those that are grazing is regarded as evidence in our view. Grazing means those that graze in the pasture and are not fed. 
Ibn Qudaamah said in al-Mughni: 
The fact that grazing animals are specifically mentioned excludes those that are fed, on which no zakah is due according to the majority of scholars. 
Maalik was of the view that zakah is due on all an’aam animals whether they are grazing or non-grazing. He quoted as evidence for that the fact that in some ahaadeeth the word ibl (camels) in used in a general sense and is not defined as those that are grazing, as in the letter of Abu Bakr to Anas (may Allah be pleased with them both) in which it says: “With regard to twenty-four camels or less, for every five one sheep (is to be given as zakah).”  
The majority of scholars responded to this deduction by stating that this hadith is general in meaning, and that the other ahaadeeth define (the animals) as those that graze. The basic principle here is that the general should be interpreted in light of the specific. 
They supported this by saying: 
With regard to the zakah on an’aam animals, it is connected to the idea of growth and multiplication. This is obvious with regard to grazing animals, because there is no cost involved in looking after them. With regard to animals that are fed, there is a cost involved in looking after them, and that cost may be equal to any growth (in their numbers or weight). Thus the wisdom and mercy of Allah dictated that zakah should be waived unless the (grazing) animals are prepared for the purpose of trade, such as when one buys animals then looks after them and feeds them in order to fatten them for sale. In that case they come under the heading of trade goods and thus are subject to zakah. 
al-Mughni, 4/12; al-Mawsoo’ah al-Fiqhiyyah, 23/250. 
For more information on how to calculate the zakah on trade goods, see question no.  10823. 
Shaykh al-Islam Ibn Taymiyah said in Majmoo’ al-Fatawa (32/32): 
The words in this hadith, “for grazing sheep” represent an area concerning which there is some scholarly difference of opinion. The view of Maalik is that working camels and oxen, and rams that are fed, are subject to zakah. Abu ‘Umar said: This is also the view of al-Layth, but I do not know of anyone who said it apart from them. With regard to al-Shaafa’i, Ahmad and Abu Haneefah, and also al-Thawri, al-Awzaa’i and others, in their view no zakah is due on these animals. This was narrated from a number of the Sahaabah: ‘Ali, Jabir, and Mu’aadh ibn Jabal. ‘Umar ibn ‘Abd al-‘Azeez also wrote a letter to this effect, and it was narrated in the hadith of Bahz ibn Hakeem from his father, from his grandfather, from the Prophet (peace and blessings of Allah be upon him), that he said: “For all grazing livestock, for every forty a two-year-old she camel (bint laboon).” So it was limited to grazing livestock, and other general reports should be interpreted in the light of specific reports, when both are speaking of the same type of animals, and there is no dispute among the scholars concerning this matter. The same may be noted concerning the hadith of Abu Bakr about grazing sheep. 
It says in Fatawa al-Lajnah al-Daa’imah, 9/205: 
One of the conditions of zakah being due on camels, cattle and sheep is that they should be grazing. 
And Allah knows best.