This paper develops an economic production quantity (EPQ) model with price and advertisement dependent demand under the effect of inflation and time value of money. Here, the rate of replenishment is considered to be a variable and the generalized unit production cost function is formulated by incorporating the several factors like raw material, labour, replenishment rate, advertisement and other factors of the manufacturing system. The selling price of an unit is determined by a mark-up over the production cost. In most of the inventory model for perishable items, the holding cost has been considered as a constant function. But in realistic situation this cost is varying according to time. In this model, the holding cost per unit of the item per unit time is assumed to be an increasing linear function of time spent in storage. Also in this model, shortages are allowed and we consider that shortage occurs before the starting of inventory. This type of inventory is called SFI (shortage followed by inventory) policy. In the model, the customers are viewed to be impatient and a fraction of the demand is exponentially backlogged. This fraction is a function of the waiting time of the customers. This model aids in minimizing the total inventory cost by finding the optimal cycle length, optimal production and the optimal order quantity. The model is extended to the case of non-perishable product also. The optimal solution of the model is illustrated with the help of a numerical example. © 2013, Operational Research Society of India.