By M. Guo OS
Imagine selling coffee. At £2 per cup, you might sell a large number, but earn relatively little per cup. At £6, you earn much more per sale, but sell fewer cups because fewer customers are willing to buy. Can we use mathematics to find a price that balances these two factors?
To answer this question, we first need to decide what perfect means. The price that maximises revenue may not maximise profit, and neither necessarily maximises society’s wellbeing. A simple economic model illustrates why.
1. Demand and Revenue
Suppose the shop faces the hypothetical demand function
where is the price of a coffee in pounds and is the number sold per day. Every £1 increase reduces sales by 20 coffees, reflecting the law of demand: as the price rises, the quantity demanded falls. At £2, demand is 100 coffees; at £7, it is zero. We restrict attention to .
Revenue is price multiplied by quantity, . Differentiating, we find the price at which a small change in price no longer increases revenue, an approach known as marginal analysis:
Since , this is a maximum: at £3.50 the shop sells 70 coffees, earning £245 per day.
2. Revenue is not profit
Now assume that producing each coffee costs £1, with no fixed costs. Profit is revenue minus production cost:
The stationary point occurs where
Again, . At £4 the shop sells 60 coffees and earns £180 profit, compared with £175 at the revenue-maximising price. Selling fewer coffees can be more profitable because the margin on each sale is higher (Figure 1).

3. Can we derive a general formula?
Replace the numbers in our demand model with constants, with , and let the constant marginal cost be . Then
Provided the optimum lies within the feasible demand range, which requires , setting gives
Setting in (2) gives , the revenue-maximising price from Section 1: maximising revenue is simply the special case of maximising profit when production costs nothing.
Here, is the choke price: the price at which demand falls to zero. Equation (2) shows that the profit-maximising price lies exactly halfway between the choke price and marginal cost. Thus, if the unit cost rises by £1, the optimal price increases by only 50p, assuming demand remains unchanged. However, this does not mean higher costs have little effect on profits. Substituting back into , the firm’s maximum achievable profit is
which still falls as rises. For our café, , as found in Section 2.
4. A third answer: maximising welfare
What if we care about the benefits to consumers and the shop together, not simply the shop’s profit? Rearranging (1) gives inverse demand, . We interpret this curve as consumers’ marginal willingness to pay. Since the total value of the coffees to consumers is the area under the demand curve, it is easier to work with the quantity , converting back to a price at the end. The total value of coffees is
Our measure of welfare is total surplus: the consumer surplus (the value of the coffees to consumers minus what they pay) plus the café’s profit. The payments cancel out, so with a production cost of £1 per coffee, total surplus is
Hence
In other words, is the value of the last coffee to a buyer minus its cost. Because , welfare is maximised at 120 coffees, which corresponds to
This is the condition price equals marginal cost, known in economics as allocative efficiency: the value of the last coffee to a buyer equals its cost of production. Under our assumptions, this price maximises total surplus, although it does not account for how the benefits are distributed. However, it is not the price our profit-maximising café would choose.
At the profit-maximising price of £4, our café produces only 60 coffees per day. The welfare loss from producing 60 rather than 120 is
As a check, at £4 consumers gain a surplus of and the café makes £180 profit, giving . The £90 lost is called deadweight loss (Figure 2).

5. Conclusion: perfect for whom?
The same demand model has given us three different prices:
| Objective | Optimal price | Coffees sold | Café profit |
|---|---|---|---|
| Maximum revenue | £3.50 | 70 | £175 |
| Maximum profit | £4.00 | 60 | £180 |
| Maximum total welfare | £1.00 | 120 | £0 |
All three prices can be derived directly from our assumptions. However, in reality, consumers do not necessarily follow linear demand curves, firms face competition and fixed costs, and policymakers may consider affordability and fairness as well as efficiency.
Mathematics can determine an optimal price once we specify an objective and a model. But mathematics alone cannot decide what that objective should be. Perhaps the most relevant question is not “What is the perfect price?” but “Perfect for whom?”
References
Corporate Finance Institute. “Marginal Analysis.” Corporate Finance Institute, 2021. https://corporatefinanceinstitute.com/resources/economics/marginal-analysis/.
“Law of Demand.” Khan Academy. https://www.khanacademy.org/economics-finance-domain/ap-microeconomics/ap-supply-demand-equilibrium/a/law-of-demand.
Pettinger, Tejvan. “Allocative Efficiency.” Economics Help. https://www.economicshelp.org/blog/glossary/allocative-efficiency/.





Leave a Reply