>>11916413It would be better to think of demand as a function of price.
Basically it is the number of purchases that would hypothetically be willing to be made at a given price.
In practice you do not have access to the full demand function and must approximate it.
Demand is also not static so different circumstances may increase/decrease demand.
The price is determined by the seller.
The seller may be considering multiple factors when choosing the price they wish to sell at.
A simple heuristic would be to choose the price that maximizes (selling price)*(# units sold). Clearly a limited supply would put an upper bound on (# units sold) so the strategy would be to set the price so that the demand at that price would match your inventory.
An even better strategy would be to start the price really high then slowly lower it to that target value to try to get the wealthy suckers to buy at a higher price.
It gets more complicated when you take into account competition, substitutes, speculation, etc.