Market Equilibrium with a Per-Unit Tax Calculator
A per-unit tax separates the price buyers pay from the price sellers receive. This calculator solves that tax wedge in a competitive market with linear demand and linear supply.
Run — free
Enter each curve's quantity intercept and price slope, plus the tax charged on every unit. The result gives the original equilibrium, the after-tax equilibrium quantity, the buyer price, the seller price, each side's per-unit burden, and total tax revenue. It is designed for economics exercises, policy scenarios, and repeatable automated calculations.
Represent the linear market consistently
The calculator writes demand as Qd = a - bPb and supply as Qs = c + dPs. Here, a is demand quantity when the buyer price is zero, b is the positive absolute slope of demand, c is supply quantity when the seller price is zero, and d is the positive slope of supply. Pb is the amount buyers pay per unit, while Ps is the amount sellers keep per unit. Before tax, Pb and Ps are the same market price. Keep every input in compatible units. If prices are dollars per item, the tax must also be dollars per item. If quantity is measured in thousands of items, intercepts, equilibrium quantities, and tax revenue all retain that scale. Enter slope magnitudes as positive numbers; the minus sign in the demand equation already captures the downward direction. The calculator treats the curves as fixed, competitive schedules. It does not infer the coefficients from observations or account for simultaneous shifts in income, technology, expectations, market structure, product quality, or related markets. Those changes require new curve inputs rather than a different interpretation of the same result.
Solve and interpret the tax wedge
A tax of t per unit creates the relationship Pb = Ps + t: buyers pay the seller price plus the tax wedge. Substituting that relationship into demand and setting demand equal to supply produces the after-tax equilibrium. The returned buyer price minus the seller price equals the tax, apart from harmless rounding at the twelfth decimal place. The original no-tax price is also reported, which makes incidence visible. The buyer tax burden per unit is the buyer price minus the original price. The seller tax burden per unit is the original price minus the seller price. In an interior competitive solution, those two burdens add to the statutory tax. This division does not depend on whether the law formally requires buyers or sellers to remit the payment. The relative slopes determine economic incidence because the less price-responsive side changes its behavior less and generally bears more of the wedge. Quantity change is reported as the after-tax quantity minus the initial quantity, so a standard positive tax normally produces a negative value. Tax revenue equals the tax per unit multiplied by the after-tax quantity, not the quantity that existed before taxation.
Recognize the model's policy limits
Use the output as a transparent partial-equilibrium benchmark, not as a complete forecast or welfare verdict. A linear curve may approximate behavior well near observed prices yet become unrealistic when a large tax pushes the solution far outside the estimation range. The calculator rejects a negative equilibrium quantity, but mathematically possible negative prices are retained because some electricity, waste, storage, or disposal markets can exhibit them. Review whether such prices make sense for the market being studied. Tax revenue is a gross collection estimate; it does not subtract administration, enforcement, avoidance, evasion, collection delays, or changes elsewhere in the tax system. Likewise, the quantity decline is not itself deadweight loss. A full welfare analysis would calculate changes in consumer surplus and producer surplus, include government revenue, and consider external costs or benefits. Real policies may also feature exemptions, thresholds, ad valorem rates, imperfect competition, inventories, cross-border trade, capacity constraints, or different short-run and long-run responses. When inputs are uncertain, run several plausible slope and tax scenarios, preserve the chosen units, and document the source and valid range of every coefficient. Each automated API calculation costs $0.002.
What you can do with it
Check an economics exercise
Verify the post-tax quantity, buyer price, seller price, and incidence for stated linear demand and supply equations.
Compare tax proposals
Run several per-unit tax amounts against the same market curves and compare quantity changes with gross revenue.
Explain economic incidence
Show why the market slopes, rather than the statutory remitter, determine how buyers and sellers share the burden.
FAQ
What equations does the calculator use?
It uses Qd = a - bPb, Qs = c + dPs, and Pb = Ps + t, then solves Qd = Qs.
Why are the buyer and seller prices different?
The per-unit tax creates a wedge: the buyer price exceeds the seller price by exactly the tax.
Does it matter who legally remits the tax?
Not in this competitive model. Supply and demand slopes determine economic incidence, regardless of statutory remittance.
How is tax revenue calculated?
Gross tax revenue is the per-unit tax multiplied by the after-tax equilibrium quantity.
Can I enter a percentage tax?
No. This capability models a fixed amount per unit, not an ad valorem percentage of price.
What does an API request cost?
Each automated API calculation costs $0.002.
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/equilibrium-with-tax \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"demand_intercept":100,"demand_slope":2,"supply_intercept":10,"supply_slope":1,"tax":9}'const res = await fetch("https://api.kit.forhosting.com/econ/equilibrium-with-tax", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"demand_intercept": 100,
"demand_slope": 2,
"supply_intercept": 10,
"supply_slope": 1,
"tax": 9
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/econ/equilibrium-with-tax",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"demand_intercept": 100,
"demand_slope": 2,
"supply_intercept": 10,
"supply_slope": 1,
"tax": 9
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/econ/equilibrium-with-tax", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"demand_intercept":100,"demand_slope":2,"supply_intercept":10,"supply_slope":1,"tax":9}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"demand_intercept":100,"demand_slope":2,"supply_intercept":10,"supply_slope":1,"tax":9}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/econ/equilibrium-with-tax", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"demand_intercept": 100,
"demand_slope": 2,
"supply_intercept": 10,
"supply_slope": 1,
"tax": 9
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "econ.equilibrium_with_tax",
"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. |