Tariff Consumer Surplus Loss Calculator
This tariff consumer surplus loss calculator measures how much consumer welfare falls when a tariff raises the domestic price of an imported good and consumers respond by buying less.
Run — free
Enter the price and quantity before the tariff and their values after it. The result separates the extra amount paid on purchases that continue from the surplus lost on purchases consumers abandon, then adds both areas to report the total consumer surplus loss under a linear-demand, small-economy model.
Enter comparable prices and quantities
Use the domestic market price paid by consumers before the tariff and the higher domestic price after the tariff. Then enter consumption before and after the policy for the same market, product definition, place, and time interval. If prices are dollars per item, quantities might be items per month; the resulting welfare amount is then dollars per month. Prices can use another currency, and quantities can be measured in thousands or millions, but the units must remain consistent across both observations. A quantity expressed in thousands produces a surplus loss in thousands of currency units. The calculator requires the post-tariff price to exceed the original price and post-tariff consumption to be lower than original consumption because those movements define the scenario being measured. It does not estimate how much of the price change was legally imposed or absorbed by foreign exporters. Supply the actual or modeled domestic price change attributed to the tariff. Avoid mixing a retail price from one product grade with an import price for another, or annual consumption with a monthly figure, because the arithmetic will remain valid while the economic interpretation will not.
Understand the rectangle and triangle
The consumer surplus loss has two components. First, consumers who continue buying the good pay a higher price on every post-tariff unit. Graphically, that loss is a rectangle whose height is the price increase and whose width is quantity purchased after the tariff. It is reported as loss on remaining purchases. Second, some purchases disappear because the higher price causes consumers to reduce quantity demanded. Under linear demand, the surplus attached to those forgone units declines evenly from the full price increase at the new quantity to zero at the old quantity. That area is a triangle equal to one half of the price increase multiplied by the reduction in quantity. The calculator reports it as loss from reduced purchases. Adding the rectangle and triangle gives the total change in consumer surplus. This total is larger than the consumption-distortion triangle alone. It measures the loss experienced by consumers, not the economy-wide deadweight loss. Part of the rectangle may become government tariff revenue or producer gains rather than vanish from national welfare, depending on who receives the tariff payment and how the market is organized.
Interpret the result in a small-economy model
The calculation assumes a small economy that takes the world price as given, so its import demand does not change the foreign export price. It also assumes the relevant demand curve is linear across the observed price and quantity change. The implied demand choke price is included as a diagnostic: it is the price at which that straight demand line would reach zero quantity. This value can help reveal inconsistent units or an implausibly flat or steep demand response, but it should not be treated as a forecast far outside the entered range. The calculator focuses only on consumer surplus. It does not calculate tariff revenue, domestic producer surplus, production distortion, net national welfare, terms-of-trade effects, customs costs, retaliation, product substitution, income effects, or distributional differences among households. Those require supply, import, or incidence information beyond the four inputs. For scenario analysis, hold the original market values fixed and vary the post-tariff price and quantity using a consistent demand assumption. Compare total losses and their two components rather than treating every dollar of consumer loss as destroyed social value. Each automated API calculation costs $0.002; the browser calculation uses the same deterministic formula without external data.
What you can do with it
Evaluate a proposed import tariff
Estimate how a modeled increase in domestic price and contraction in consumption change consumer welfare.
Check a trade-economics exercise
Verify the consumer-loss rectangle, consumption triangle, total surplus loss, and implied linear demand intercept.
Compare tariff incidence scenarios
Test alternative pass-through and consumption responses while keeping price and quantity units consistent.
FAQ
What formula does the calculator use?
Total consumer surplus loss equals the price increase times post-tariff quantity, plus one half times the price increase times the reduction in quantity.
Is consumer surplus loss the same as deadweight loss?
No. Consumer surplus loss includes higher payments on units still purchased. Some of those payments may become tariff revenue or producer surplus rather than a net loss to the economy.
Why must quantity fall after the tariff?
This calculator models a tariff that raises price and moves consumers upward along a downward-sloping demand curve. A constant or higher quantity does not describe that specified scenario.
What units does the result use?
It uses price units multiplied by quantity units. Dollars per item and items per year produce dollars per year; quantities in thousands produce results in thousands of currency units.
Does it calculate tariff revenue?
No. Revenue requires the tariff per imported unit and the post-tariff import quantity, which may differ from total domestic consumption.
How much does an API calculation cost?
Each API request costs $0.002. The formula is deterministic and uses no external service.
For developers — API access
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.
API endpoint
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.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/econ/tariff-consumer-loss \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"price_before_tariff":20,"price_after_tariff":26,"quantity_before_tariff":1000,"quantity_after_tariff":760}'const res = await fetch("https://api.kit.forhosting.com/econ/tariff-consumer-loss", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"price_before_tariff": 20,
"price_after_tariff": 26,
"quantity_before_tariff": 1000,
"quantity_after_tariff": 760
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/econ/tariff-consumer-loss",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"price_before_tariff": 20,
"price_after_tariff": 26,
"quantity_before_tariff": 1000,
"quantity_after_tariff": 760
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/econ/tariff-consumer-loss", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"price_before_tariff":20,"price_after_tariff":26,"quantity_before_tariff":1000,"quantity_after_tariff":760}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"price_before_tariff":20,"price_after_tariff":26,"quantity_before_tariff":1000,"quantity_after_tariff":760}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/econ/tariff-consumer-loss", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"price_before_tariff": 20,
"price_after_tariff": 26,
"quantity_before_tariff": 1000,
"quantity_after_tariff": 760
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "econ.tariff_consumer_loss",
"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.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |