Is the value of trade goods based on the selling price or the purchase price?
Question

When working out the zakah on trade goods, is it based on the purchase price or the selling price?.
Praise be to Allah.The value of trade goods is worked out at the end of the year, based on the price for which the owner would sell them. 
This is what is fair, for the value to be based on the selling price, which may be lower or higher than the purchase price, because at the end of the year, a person pays zakah on the wealth that he has. 
Ibn Qudaamah said in al-Mughni (4/249) 
Whoever owns trade goods and one year has passed, and they reach the nisaab, should work out their value at the end of the year. If they reach the nisaab, he should pay zakah, which is one-quarter of one-tenth of their value. End quote. 
It says in al-Mawsoo’ah al-Fiqhiyyah (13/171): 
The trader should not work out the value of his trade goods on the basis of the price of one who is forced to sell his products. Rather he should base it on the price which he would get if he sold it without being under great pressure. End quote. 
So the values should be based on the selling price at the end of the year. 
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said: 
In the case of land which is bought in order to be sold, the owners usually wait for the price to increase. These are trade goods, and the value of trade goods should be worked out when one year has passed, then one-quarter of one-tenth should be paid.  
It makes no difference whether the value of the land is the same as the price you bought it for or not. If we assume that a man bought some land for one hundred thousand, and when one year has passed it is worth two hundred thousand, then he must pay zakah on two hundred thousand. If the opposite happened, and he bought it for one hundred thousand and after one year has passed it is worth fifty thousand, then he only has to pay zakah on fifty thousand, because what matters is the value at the time when zakah becomes due. 
Majmoo’ Fatawa Ibn Uthaymeen, 18/205; see also 18/240 
The Standing Committee was asked: In the case of land that has been bought for trade, how should the zakah be worked out? Is it based on the purchase price or on the market value at the time when one year has passed and the zakah is due? 
They replied: 
Land which has been bought to sell comes under the heading of trade goods, and the general principle in Islamic sharee’ah is that the value of trade goods should be worked out after one year has passed, according to their market value, regardless of the purchase price, and regardless of whether the market price at the time when zakah becomes due is more or less. The zakah should be paid on their value, and the rate of zakah is one-quarter of one-tenth. In the case of land that is worth one thousand riyals, for example, the zakah is twenty-five riyals, and so on."(Fatawa al-Lajnah al-Daa’imah, 9/324) 
It also says in Fatawa al-Lajnah al-Daa’imah (9/319): 
The shar’i way is to evaluate the trade goods that one has at the end of the year according to their market value at the time when zakah becomes due, regardless of the purchase price. End quote. 
Based on this, if the trader sells wholesale or retail, the value of the goods that he has should be based on the price for which he sells them. 
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) was asked: It is known that what matters is the value of the goods at the time when zakah becomes due. But even at the time when zakah becomes due, the price varies between wholesale and retail. Should we look at the wholesale price or the retail price? 
He replied: 
If the trader deals in wholesale, he should look at the wholesale price, and if he deals in retail, he should look at the retail price."(Majmoo’ Fatawa Ibn ‘Uthaymeen, 18/233)
See also question no.  26236.