ForHosting KIT · Developer Utilities

Deadweight Loss from a Price Floor Calculator

This deadweight loss price floor calculator measures the total surplus lost when a legal minimum price sits above the competitive equilibrium in a linear market.

● BetaFree · in your browser
Use it from WebAPIEmailTelegramApp soon

Enter the intercept and slope for demand, the intercept and slope for supply, and the proposed floor. The calculator solves the original equilibrium, finds quantity demanded and supplied at the floor, treats demand as the limiting traded quantity, and reports the welfare triangle created by the transactions that no longer occur.

Describe the linear market consistently

Enter demand in the form Qd = demand_intercept − demand_slope × price and supply in the form Qs = supply_intercept + supply_slope × price. Both slope inputs are positive magnitudes: the calculator supplies the minus sign for demand and the plus sign for supply. Keep every value in compatible units. If price is dollars per item and quantity is thousands of items, both intercepts must use thousands of items and both slopes must use thousands of items per dollar. The resulting deadweight loss will then be measured in thousands of dollars, because a price difference is multiplied by a quantity difference. The supply slope must be strictly positive because the algorithm uses the inverse supply curve to identify marginal cost at the reduced traded quantity. Estimated intercepts may be negative, but the curves must produce a nonnegative equilibrium quantity and a nonnegative quantity demanded at the floor. Those restrictions prevent an algebraically valid line from being presented as a meaningful market result far outside its useful range. Review signs carefully before interpreting the output: entering an already negative demand slope would reverse the intended curve and is therefore rejected.

Why the price floor must be binding

The calculator first solves the competitive equilibrium by setting quantity demanded equal to quantity supplied. A price floor affects trade only when it is strictly above that equilibrium price. If the proposed minimum is equal to or below equilibrium, buyers and sellers can continue trading at equilibrium, so this particular binding-floor model does not apply and the input is rejected. At a binding floor, quantity demanded falls while quantity supplied rises. Without government purchases or another buyer for the excess output, the short side of the market determines actual trade, so traded quantity equals quantity demanded. The difference between quantity supplied and quantity demanded is reported as surplus quantity, but that surplus is not itself the deadweight loss. Deadweight loss comes from mutually beneficial trades between the reduced traded quantity and the competitive equilibrium quantity that no longer happen. This distinction matters: multiplying the visible surplus by the regulated price does not measure lost welfare, producer loss, or storage cost. The calculation assumes no rationing inefficiency among sellers and no purchases of surplus by the government. If either feature is present, additional welfare effects require a broader model.

Read the welfare triangle and its assumptions

For the trades removed by the floor, the demand curve represents marginal willingness to pay and the supply curve represents marginal cost. At the final traded quantity, willingness to pay equals the floor because that quantity lies on demand. The calculator evaluates the inverse supply curve at the same quantity to find marginal cost, then subtracts that cost from the floor to obtain the welfare wedge. The triangle has a horizontal base equal to the reduction from equilibrium quantity to traded quantity and a vertical height equal to that welfare wedge. Deadweight loss is one half of base times height. The result is deterministic and rounded only for stable display; the underlying formula uses the entered values directly. It describes a competitive linear market with no tax, subsidy, externality, price support purchases, disposal costs, quality changes, black market, or administrative expense. It also treats every unit up to the demand-limited quantity as going to the buyers who value it most. Use the output as a transparent partial-equilibrium estimate, and test alternative curve estimates when slopes are uncertain. Automated requests cost $0.002, while the same analytic calculation requires no network service or changing external data.

Evaluate an agricultural support price

Estimate lost market surplus and excess production when a minimum commodity price exceeds the competitive equilibrium.

Check an economics assignment

Verify equilibrium, quantities at the floor, the welfare wedge, and the area of the deadweight-loss triangle.

Compare policy scenarios

Run several proposed floors against the same linear demand and supply curves to compare reductions in trade and welfare.

What formula is used for deadweight loss?

Deadweight loss equals one half times the reduction in traded quantity times the gap between willingness to pay and marginal cost at the new traded quantity.

Why is traded quantity equal to quantity demanded?

At a binding floor, quantity demanded is below quantity supplied. With no government purchase of surplus, buyers are the short side of the market and limit completed trades.

Is surplus quantity the same as deadweight loss?

No. Surplus quantity is excess supply at the floor. Deadweight loss is the value of beneficial trades lost between the traded quantity and competitive equilibrium quantity.

What happens if the floor is below equilibrium?

It is nonbinding and does not change the competitive outcome in this model. The calculator rejects it because there is no binding-floor welfare triangle to compute.

Does the calculator include government purchases or storage costs?

No. It assumes unsold surplus is not purchased. Government procurement, storage, disposal, taxes, and administrative costs need separate welfare terms.

How much does an API calculation cost?

Each API request costs $0.002. The calculation is deterministic and uses no external service.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/econ/deadweight-loss-price-floor

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/econ/deadweight-loss-price-floor \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"demand_intercept":120,"demand_slope":2,"supply_intercept":20,"supply_slope":3,"price_floor":30}'
{
  "demand_intercept": 120,
  "demand_slope": 2,
  "supply_intercept": 20,
  "supply_slope": 3,
  "price_floor": 30
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "econ.deadweight_loss_price_floor",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Read the full KIT documentation →