Import Expenditure Calculator
Import expenditure is the total amount paid for imported goods, calculated by multiplying the price of each imported unit by the quantity imported.
Run — free
This calculator gives a direct, reproducible result for trade analysis, classroom exercises, forecasts, and national-accounting inputs. Enter values measured on a consistent basis: the price should apply to one unit of the same good represented by the quantity. The result is expressed in the currency used for the price and can be used as an import component when examining the trade balance or aggregate demand.
What import expenditure measures
Import expenditure measures the monetary value of goods purchased from abroad for the price and quantity entered. The calculator applies the identity total import expenditure equals import price multiplied by import quantity. It does not infer a currency, convert exchange rates, add freight, or adjust customs values; those choices belong in the price supplied by the user. If the price is quoted in dollars per tonne and the quantity is in tonnes, the result is in dollars. If the price is euros per item and the quantity is a count of items, the result is in euros. This consistency matters because multiplying a price per kilogram by a quantity recorded in tonnes would produce a result off by a factor of one thousand. Economists use import expenditure as the import-value term in trade analysis. In an expenditure approach to aggregate demand, imports are subtracted because imported production is included elsewhere in consumption, investment, or government spending but was not produced domestically.
How to enter price and quantity correctly
Begin with the import price for one clearly defined unit, then enter the corresponding imported quantity. Both inputs must be finite numbers that are zero or greater. A zero price or zero quantity produces zero expenditure, which can represent a free shipment, no imports during a period, or a scenario boundary. Negative values are rejected because this calculator measures a gross expenditure amount rather than a refund, correction, or net financial flow. Before calculating, confirm whether the price is a unit price, a price per weight, or a price per volume. Convert the quantity into that same unit first. Also decide whether the price includes insurance and freight, excludes tariffs, or represents a customs valuation; the algorithm multiplies the figures exactly as entered and does not silently alter their economic definition. For time-series comparisons, keep the valuation basis and currency consistent across periods, or perform inflation and exchange-rate adjustments separately before interpreting changes.
Interpreting the result in trade analysis
The returned total is a nominal import expenditure for the supplied observation or scenario. It can be compared with export revenue to help calculate a trade balance, aggregated across products to estimate total merchandise imports, or inserted into a simple aggregate-demand exercise. The result alone does not explain why import spending changed. Expenditure may rise because foreign prices increased, because the domestic economy purchased a larger quantity, because the exchange rate changed the domestic-currency price, or because several effects occurred together. Analysts can isolate simple scenarios by holding one input constant and changing the other. For example, keeping quantity fixed shows the direct expenditure effect of a different unit price, while keeping price fixed shows the effect of a volume change. When combining products, calculate each item with compatible valuation conventions and then sum their expenditures. The API price is $0.002 per request, and the same deterministic multiplication makes repeated calculations suitable for auditable worksheets, teaching materials, and automated economic models.
What you can do with it
Estimate a shipment's import value
Multiply the contracted price per unit by the shipment quantity before adding any separately modeled duties or fees.
Build a trade-balance scenario
Calculate import expenditure under alternative price or volume assumptions and compare it with projected export revenue.
Teach aggregate demand
Show how the import component changes when either the price of imports or the quantity purchased changes.
FAQ
What is the import expenditure formula?
Total import expenditure equals import price per unit multiplied by import quantity.
Which currency does the result use?
The result uses the currency of the import price. No exchange-rate conversion is performed.
Can the price or quantity be zero?
Yes. Either input may be zero, in which case total import expenditure is zero.
Does the calculator include tariffs, freight, or insurance?
Only if those costs are already included in the unit price you enter. The calculator does not add them automatically.
How much does an API calculation cost?
Each API request costs $0.002. The calculation is also available through the browser experience.
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/import-expenditure \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"import_price":12.5,"import_quantity":800}'const res = await fetch("https://api.kit.forhosting.com/econ/import-expenditure", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"import_price": 12.5,
"import_quantity": 800
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/econ/import-expenditure",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"import_price": 12.5,
"import_quantity": 800
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/econ/import-expenditure", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"import_price":12.5,"import_quantity":800}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"import_price":12.5,"import_quantity":800}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/econ/import-expenditure", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"import_price": 12.5,
"import_quantity": 800
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "econ.import_expenditure",
"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. |