As other members mentioned the competition, the supply and demand and cost of product plus profit margin. There is a bench-mark price, which is the market value, and this basic fundamental value has a logical calculated sum to the price. For example, the price of petrol from one oil pump station cannot be very much different from another pumping station. This is due to the cost price of the raw material, plus the cost to refine it and to transport it to the pump station and the operating cost of the station and their marketing, sales and other cost added to their profit margin becomes their selling price.
Marketing people differentiate the product and the market sector, and make product for the high end market and the low end market, and the medium end market sectors according to the demographic profile of the target market. There is also a variable they play with in accordance to supply and demand. For example: Hotel room rates are variable, according to the demands, during school holidays, and during holidays or festivals the room rates are higher than the normal days.
For products, they will grade them as to their purity, quality and standard, for Premium product of No. 1 grade, the price will be at its maximum point, and for the lower grades they are sold at lower prices.