Inputs
Observed Price–Quantity Data
| Price | Quantity |
|---|
Results
Graphs
Formula Used
We fit a linear demand curve from observed pairs \u2014 price P and quantity Q \u2014 using ordinary least squares on Q = a + mP. We then rewrite as Q = a \u2212 bP where b = \u2212m (so b > 0 when demand decreases with price). Goodness of fit is reported with R\u00b2.
With unit cost c and an ad valorem tax rate t applied to the selling price, profit as a function of price is
Maximizing \u03C0(P) yields the closed-form optimal price:
Elasticity of demand at a point is E = (dQ/dP) \u00D7 (P/Q). For the linear model, dQ/dP = \u2212b, so E = \u2212b \u00D7 P/Q. The profit-maximizing Lerner condition (P* - c')/P* = -1/E* (with c' = c/(1 - t)) holds when the linear model fits well.
If you specify a Target Margin, we also compute a price solving (P - c')/P = margin; this is not the same as profit-maximizing unless it coincides with the Lerner index.