By MCP Analytics Team | Published , updated
Upload a CSV with a price column and a quantity column, and this tool estimates how much demand has moved with price in your data, with an interval, by segment if you add one, and what a 10% price change would do to revenue if that estimate holds.
The practical guide behind this tool: when it applies, how to read the output, and the traps that make it say the wrong thing.
The numbers below come from made-up data, made by the code on this page. They show the method. They are not output from this tool and not a finding about your data.
Question: If demand falls as price rises, can a log-log fit recover the elasticity for each segment, and what goes wrong when prices follow demand?
Inputs: Simulated weekly sales, not real data. Seed 5 makes two segments of 150 weeks each, with prices from 8 to 12. Built in: elasticity -1.5 for segment A and -0.6 for segment B, with random noise in quantity. The pitfall check makes 150 weeks where price is raised in busy weeks, with a true elasticity of -1.5.
Method: Ordinary least squares of log quantity on log price, one fit per segment. The slope is the elasticity, with a 95% interval from the t distribution. The revenue effect of a 10% price rise is 1.10 raised to the power (1 + elasticity), minus 1. This sketch skips controls for season or promotions, which the page's guide covers.
Result: Segment A came out at -1.58 (95% interval -1.79 to -1.37), so a 10% price rise would cut revenue by 5.4%. Segment B came out at -0.51 (interval -0.72 to -0.30), so the same rise would lift revenue by 4.8%. Both intervals hold the built-in value. When prices followed demand, the fit gave +1.45 (interval 1.15 to 1.75) against a true -1.50, the wrong sign.
Limit: Price moves by chance, a constant elasticity and no promotions, seasons or competitors. Real prices are usually set in response to demand, which this example shows can flip the answer. It cannot show cross-price effects or whether a past estimate holds after a large price change.
Python script (numpy and scipy only):
import numpy as np
from scipy import stats
# Simulated weekly sales. Built in: elasticity -1.5 for segment A, -0.6 for segment B, seed 5.
rng = np.random.default_rng(5)
def sim(n, e, base):
price = rng.uniform(8, 12, n)
qty = base * (price / 10) ** e * np.exp(rng.normal(0, 0.15, n))
return price, qty
def fit(price, qty):
x = np.log(price); y = np.log(qty); n = len(x)
r = stats.linregress(x, y)
t = stats.t.ppf(0.975, n - 2)
return r.slope, r.slope - t * r.stderr, r.slope + t * r.stderr
for name, e, base in [("A", -1.5, 200), ("B", -0.6, 120)]:
p, q = sim(150, e, base)
b, lo, hi = fit(p, q)
rev = (1.10) ** (1 + b) - 1
print("segment %s: elasticity %.2f (95%% interval %.2f to %.2f), 10%% price rise -> revenue %+.1f%%" % (name, b, lo, hi, 100 * rev))
# Pitfall: price moves only when demand is high (raising price in busy weeks)
n = 150
demand = rng.normal(0, 0.3, n)
price = 10 * np.exp(0.25 * demand + rng.normal(0, 0.05, n))
qty = 200 * (price / 10) ** -1.5 * np.exp(demand + rng.normal(0, 0.1, n))
b, lo, hi = fit(price, qty)
print("prices follow demand: elasticity %.2f (95%% interval %.2f to %.2f), true value -1.50" % (b, lo, hi))
Printed output from running the code above:
segment A: elasticity -1.58 (95% interval -1.79 to -1.37), 10% price rise -> revenue -5.4%
segment B: elasticity -0.51 (95% interval -0.72 to -0.30), 10% price rise -> revenue +4.8%
prices follow demand: elasticity 1.45 (95% interval 1.15 to 1.75), true value -1.50
How much has demand dropped when the price was higher? The elasticity with its interval, by segment, and what a 10% price move would do to revenue if the estimate holds.
Charts, tables, and diagnostics.
Plain-English reading of the results.
See our FAQ for pricing, privacy and how the analysis works.
MCP Analytics. Price elasticity. Free tool. https://mcpanalytics.ai/free/standard_price_elasticity_v2. Add the date you accessed it.
Tell us what went wrong, in your own words. We capture the page you're on automatically, so no need to describe where you are.