ForHosting KIT · Developer Utilities

Tariff Revenue Calculator

This tariff revenue calculator estimates how much a government collects when a per-unit tariff raises the domestic price and reduces imports.

● BetaFree · in your browser
Use it from WebAPIEmailTelegramApp soon

Enter the tariff, the import volume before the policy, and the number of imported items demand loses for each unit of price increase. The calculator applies a linear import-demand response, prevents import volume from falling below zero, and multiplies the tariff by the imports that remain. It also reports the volume reduction so the revenue result can be checked and explained.

Define the import market before applying the tariff

Start with a consistent unit for the imported good and a consistent currency for the tariff. The imports_before_tariff value is the number of items imported at the original domestic price. The import_reduction_per_price_unit value describes a linear response: how many imported items disappear when the domestic price rises by one currency unit. For example, a value of 250 means that every one-unit price increase reduces imports by 250 items. The calculator assumes full tariff pass-through, so a tariff of 8 per item raises the domestic price by 8. This assumption keeps the calculation transparent and matches the standard classroom model in which the world price is fixed and the tariff creates an equal wedge in the importing country. If the observed domestic price rises by less than the statutory tariff, use a reduction parameter calibrated to the effective market response or interpret the result as the full-pass-through scenario. All three inputs must refer to the same good, period, currency, and item definition; mixing annual imports with a monthly demand response produces a number that is arithmetically valid but economically meaningless.

Calculate imports remaining and government revenue

The calculator first multiplies tariff_per_unit by import_reduction_per_price_unit. That product is the unconstrained decrease in import volume caused by the tariff-induced price increase. It then subtracts the decrease from imports_before_tariff. Because a market cannot import a negative physical quantity, imports_remaining is floored at zero. The reported imports_reduced therefore never exceeds the original import volume. Government tariff revenue is tariff_per_unit multiplied by imports_remaining, not by the pre-tariff volume. This distinction is the central purpose of the calculation: applying the tax rate to the old quantity overstates collections whenever the tariff discourages imports. If the calculated demand reduction is large enough to eliminate imports, revenue is zero even though the tariff rate is positive, and imports_eliminated is true. The output also repeats the assumed domestic price increase and tariff per unit, making the chain of arithmetic easy to audit. Values are returned with stable numeric precision so identical valid inputs produce identical JSON in the browser and API.

Interpret the estimate and test alternative tariff rates

Tariff revenue does not necessarily rise when the tariff rate rises. A higher tariff collects more on every item that still enters, but it also reduces the number of taxable imports. With a linear import-demand response, revenue follows an inverted curve over the range where imports remain positive: it begins at zero when the tariff is zero, can reach a maximum at an intermediate rate, and returns to zero when the tariff eliminates imports. Run several tariff_per_unit values while holding the baseline imports and response coefficient constant to compare policy scenarios. Treat this as a partial-equilibrium estimate, not a complete forecast of public finances or welfare. It does not model changes in the world price, exchange rates, foreign retaliation, customs exemptions, evasion, administrative costs, domestic supply responses, or tariff-rate quotas. It also assumes one homogeneous good and one linear response over the entire tested range. For empirical work, estimate the import response from data appropriate to the product and period, then compare the calculator result with actual customs collections. Revenue alone also does not measure consumer loss, producer gain, or deadweight loss, so those outcomes require separate analysis.

Prepare a policy scenario

Estimate collections under a proposed per-unit tariff while accounting for the import volume that the higher domestic price removes.

Check an economics exercise

Verify the remaining import quantity and tariff revenue in a small-country linear import-demand problem.

Compare tariff rates

Run several rates against the same baseline and response coefficient to see when a higher rate begins to reduce revenue.

What is the tariff revenue formula?

Imports remaining equal imports before the tariff minus tariff per unit times the import reduction per price unit, floored at zero. Tariff revenue equals tariff per unit times imports remaining.

Why not multiply the tariff by imports before the tariff?

The tariff raises the domestic price and reduces import demand. Only goods that still enter after that response are subject to the tariff.

What price increase does the calculator assume?

It assumes full pass-through: the domestic price increase equals the tariff per unit.

Can tariff revenue be zero with a positive tariff?

Yes. If the modeled reduction equals or exceeds the original import volume, no imports remain and there is no tariff base to tax.

Does this calculate the optimal tariff?

No. It calculates revenue for a specified rate under a linear response. It does not model terms-of-trade effects, welfare, retaliation, or other requirements of an optimal-tariff analysis.

What does the API calculation cost?

Each API request costs $0.002. The same deterministic calculation can run in the browser without sending the inputs over the network.

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/tariff-revenue

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/tariff-revenue \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tariff_per_unit":8,"imports_before_tariff":5000,"import_reduction_per_price_unit":250}'
{
  "tariff_per_unit": 8,
  "imports_before_tariff": 5000,
  "import_reduction_per_price_unit": 250
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "econ.tariff_revenue",
  "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 →