Tabellab
Business & operations

Price elasticity of demand from a log-log regression in Excel

To estimate price elasticity of demand from your own sales data, take the natural log of price and of units sold and fit a straight line: in a log-log regression the slope is the elasticity. In Excel that is one formula, =SLOPE(LN(units),LN(price)). In the example below, twelve weeks of sales of a loose-leaf tea at prices between $5.49 and $7.49 give an elasticity of −1.79 with an R² of 0.98: a 10% price rise costs about 15.6% of the units. With a unit cost of $3.10, the markup rule then puts the profit-maximising price at $7.05.

Updated 21 Oct 2026 5 min read By Tabellab team

What price elasticity of demand means

Price elasticity e = % change in quantity ÷ % change in price

An elasticity of −1.79 means that a 1% higher price sells about 1.79% fewer units. Below −1 (in absolute terms above 1) demand is elastic: a price rise loses more units than it gains in price, so revenue falls. Between 0 and −1 demand is inelastic and a price rise increases revenue. Elasticity is almost always negative, and many analysts quote it without the sign.

Why a log-log regression

One price change gives one noisy estimate. With many weeks at different prices you can use all of them at once. The usual model is the constant-elasticity demand curve Q = A × Pe. Take natural logs on both sides and it becomes a straight line: ln Q = ln A + e × ln P. Its slope is the elasticity, unit-free and directly readable as a percentage, at every price on the curve.

A plain regression of units on price would give "units lost per $1", which depends on the size of the product and changes along the curve. The log-log slope does not.

Step by step in Excel

Add two helper columns, =LN(B2) for the price and =LN(C2) for the units, and fill them down. Then:

  • Elasticity: =SLOPE(E2:E13,D2:D13) = −1.79 (y-values first, x-values second)
  • Intercept: =INTERCEPT(E2:E13,D2:D13) = 9.236, which is ln A
  • Fit: =RSQ(E2:E13,D2:D13) = 0.979

To forecast, go back from the log scale: =EXP(intercept)*price^elasticity. At the current $6.49 the model expects 364 units a week. A 10% price rise changes units by 1.1−1.79 − 1 = −15.6%, slightly less than 10 × 1.79 because the relationship is not linear. An XY scatter chart of LN(units) against LN(price) with a linear trendline shows the same slope and lets you spot outlier weeks.

Worked example: elasticity of a loose-leaf tea

Twelve weeks of prices and units are inputs. The log columns, the regression and the price decision are formulas.

Worked example: elasticity of a loose-leaf tea
ABCDE
1WeekPrice ($)Units soldLN(price)LN(units)
2Week 15.994331.7906.071
3Week 26.493531.8705.866
4Week 35.495011.7036.217
5Week 46.993311.9445.802
6Week 55.994031.7905.999
7Week 67.492752.0145.617
8Week 76.493741.8705.924
9Week 85.794421.7566.091
10Week 96.993091.9445.733
11Week 106.293881.8395.961
12Week 117.293011.9875.707
13Week 125.494821.7036.178
14
15ResultValue
16Price elasticity e (slope of the log-log line)-1.79
17Intercept (log scale)9.236
18R² of the fit0.979
19Units change for a 10% price rise-15.6%
20Current price ($)6.49
21Forecast units/week at the current price364
22Unit cost ($)3.10
23Profit-maximising price: cost × e ÷ (1 + e)7.05
24Forecast units/week at that price314
25Weekly profit at the current price ($)1,232.49
26Weekly profit at the optimal price ($)1,238.78
Key formulas
  • E16=SLOPE(E2:E13,D2:D13)Elasticity = slope of ln(units) on ln(price)
  • E21=EXP(E17)*E20^E16Forecast back on the unit scale
  • E23=E22*E16/(1+E16)Markup rule
  • E26=(E23-E22)*E24Profit at the optimal price

Fictional product and illustrative sales data.

From elasticity to the best price

For a constant elasticity e (more elastic than −1), profit is highest where price = unit cost × e ÷ (1 + e), the markup rule. With e = −1.79 the multiplier is 2.27, so a $3.10 unit cost gives an optimal price of $7.05. The forecast then sells 314 units and earns $1,238.78 a week against $1,232.49 at $6.49. The gain is small because a profit curve is flat near its peak: a price somewhat too low or too high costs little, which is a good reason to move in steps and test. See markup vs margin for the pricing arithmetic.

Arc elasticity: the quick check

Without a regression, the arc (midpoint) elasticity between two price points divides the changes by their averages: (Q₂ − Q₁) ÷ ((Q₁ + Q₂) ÷ 2) divided by (P₂ − P₁) ÷ ((P₁ + P₂) ÷ 2). Between the $5.49 week (501 units) and the $7.49 week (275 units) it gives −1.89. It is useful as a sanity check, but it rests on two weeks only, and whatever else happened in those weeks ends up in the number. Using the averages as the base makes the result the same whichever week you start from, unlike a plain percent change.

Promotions, seasons and other traps

If price cuts came with a display, an email or a holiday, the slope credits the price for the extra sales and the elasticity looks too high. Add dummy variables for promotion weeks and seasons and fit them together with LN(price) using LINEST: the price coefficient is then the elasticity with the other effects held constant. Also check that prices varied enough: weeks at only two prices give a slope with a large error. And remember that elasticity holds within the price range you observed. Far outside it the model is a guess.

Common mistakes

  • Swapping x and y in SLOPE. The units are the y-values and come first: SLOPE(ln units, ln price).
  • Forgetting EXP in the forecast. The fitted line predicts ln(units), a number around 6, not the units themselves.
  • Using LOG instead of LN. Base-10 logs give the same slope only if both columns use them, so stay with LN for both.
  • Ignoring promotions and seasonality. Price cuts that come with marketing make demand look more elastic than it is. Control for them with dummy variables in LINEST.
  • Applying the markup rule to inelastic demand. With e between 0 and −1 the formula breaks down, which means the price can still go up profitably.
  • Extrapolating far outside the tested prices. The constant-elasticity curve fits the range in the data, not every price.

Frequently asked questions

How do you calculate price elasticity of demand from a regression?

Take the natural log of units sold and of price, then regress ln(units) on ln(price). The slope of that log-log line is the price elasticity. In Excel use =SLOPE(LN(units), LN(price)) or helper columns with LN and the SLOPE function.

Why use logs to estimate price elasticity?

In a log-log model a change in ln is approximately a percentage change, so the slope is the percentage change in quantity per 1% change in price. That is exactly the definition of elasticity, and it is the same at every price on a constant-elasticity curve.

What is a good R-squared for a demand regression?

There is no fixed threshold. Weekly sales data often fit less well than the example because of promotions, seasons and stock-outs. Check the scatter chart, add control variables and look at the standard error of the slope rather than R-squared alone.

What is the formula for the profit-maximising price with elasticity?

With a constant elasticity e that is below -1, the profit-maximising price is unit cost x e / (1 + e). Equivalently, the Lerner index (price - cost) / price equals -1 / e.

Practise it in a lab

Related guides

Reading is step one. Doing is step two.

Every guide links to a lab where you build the same calculation in an online spreadsheet and get instant feedback.

Open the lab