The 'cost' in the LCM rule generally refers to the historical cost of purchasing the inventory, including all expenses associated with bringing the inventory to its present location and condition. The 'market value' is typically defined as the current replacement cost of the inventory but is limited to a ceiling (net realizable value) and a floor (net realizable value minus a normal profit margin).