Price Elasticity Calculator
Calculate price elasticity of demand and supply.
% Price Change
+20.00%
% Quantity Change
-20.00%
Elasticity
-1.0000
Interpretation
Unit Elastic (|E| = 1) β Proportional change
0 (inelastic)
3+ (elastic)
Frequently Asked Questions
Code Implementation
def price_elasticity(q1, q2, p1, p2):
"""
Calculate price elasticity of demand using midpoint method.
q1, q2: quantity demanded before and after price change
p1, p2: price before and after
"""
avg_q = (q1 + q2) / 2
avg_p = (p1 + p2) / 2
pct_change_q = (q2 - q1) / avg_q * 100
pct_change_p = (p2 - p1) / avg_p * 100
ped = pct_change_q / pct_change_p if pct_change_p != 0 else float('inf')
return ped
# Example: price rises from $10 to $12, quantity falls from 100 to 80
ped = price_elasticity(100, 80, 10, 12)
print(f"Price Elasticity of Demand: {ped:.4f}")
abs_ped = abs(ped)
if abs_ped > 1:
print("Elastic demand (|PED| > 1) - price-sensitive")
elif abs_ped < 1:
print("Inelastic demand (|PED| < 1) - price-insensitive")
else:
print("Unit elastic (|PED| = 1)")Comments & Feedback
Comments are powered by Giscus. Sign in with GitHub to leave a comment.