GDP deflator calculator
Turn nominal and real GDP into the economy-wide price index: nominal GDP of 1100 against real GDP of 1000 gives a GDP deflator of 110, 10 points above the base year. Made for problem sets and exam checks. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Nominal gdp
- 1,100
- Real gdp
- 1,000
- Ratio
- 1.1
- Gdp deflator
- 110
- Vs base percent
- 10
- Price level band
- above_base_year
The GDP deflator is the standard macroeconomics measure of the overall price level of goods and services produced in an economy: it compares nominal GDP valued at current prices with real GDP valued at constant base-year prices, then scales the ratio by one hundred so the base year itself reads one hundred. Students, tutors, and exam writers need a fast, deterministic way to turn any valid nominal–real pair into that index without mixing it up with CPI baskets or year-over-year inflation rates. This GDP deflator calculator accepts positive nominal and real GDP figures in the same currency units, returns the unitless ratio, the deflator index, how many percentage points the index sits above or below the base of one hundred, and a short formula string you can place next to the answer.
What the GDP deflator measures and how the formula works
Nominal GDP multiplies current-period quantities by current-period prices, so it rises both when the economy produces more and when prices climb. Real GDP holds prices fixed at a chosen base year, so it tracks only quantity change. Dividing nominal by real therefore cancels the quantity path and leaves a pure price index for the entire market basket of domestic production: GDP deflator equals nominal GDP divided by real GDP, times one hundred.
In the base year nominal equals real by construction, the ratio is one, and the deflator is exactly one hundred. When current prices are higher than base-year prices on average, nominal exceeds real and the deflator sits above one hundred; when current prices are lower, the deflator falls below one hundred. Unlike a consumer price index, the GDP deflator covers investment goods, government purchases, and net exports of goods and services produced domestically, and its basket automatically updates with the composition of current output.
That breadth is why textbooks call it an economy-wide or GDP price index rather than a cost-of-living index for urban households. This calculator implements the textbook identity only: it does not chain-weight series, splice base years, or convert between chain-type quantity indexes and fixed-base real GDP. You supply one nominal level and one real level for the same period and currency, and you receive the corresponding deflator ready for problem sets, slides, and automated checks.
What you can do with it
Classroom nominal–real checks
Let students enter nominal and real GDP and verify GDP deflator = (nominal / real) × 100 against textbook worked examples.
LMS and exam auto-grading
Mark GDP-deflator items with a deterministic oracle that rejects non-positive GDP levels and never invents a hollow base year.
Macro notebooks and teaching dashboards
Batch-compute economy-wide price indexes from published nominal and real GDP without spreadsheet formula drift.
FAQ
How is the GDP deflator calculated?
GDP deflator = (nominal GDP / real GDP) × 100. Send two positive figures in the same currency units for the same period.
What does a GDP deflator of 100 mean?
A deflator of 100 means nominal GDP equals real GDP, the base-year price level by construction for a fixed-base real series.
How is the GDP deflator different from CPI?
CPI tracks a fixed consumer basket of goods and services bought by households. The GDP deflator covers all domestically produced final goods and services and updates with the composition of current output.
Can I get the inflation rate from the GDP deflator?
Not from a single result. This tool gives the level of the index for one period. Calculate the deflator for two periods, then take the percent change between them to get inflation.
Do nominal and real GDP need the same units?
Yes. Enter both in the same currency units and for the same period, with real GDP valued at base-year prices. Both values must be greater than zero, or no deflator is calculated.
Related tools
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/gdp-deflator \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"nominal_gdp":1100,"real_gdp":1000}'const res = await fetch("https://api.kit.forhosting.com/econ/gdp-deflator", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"nominal_gdp": 1100,
"real_gdp": 1000
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/econ/gdp-deflator",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"nominal_gdp": 1100,
"real_gdp": 1000
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/econ/gdp-deflator", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"nominal_gdp":1100,"real_gdp":1000}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"nominal_gdp":1100,"real_gdp":1000}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/econ/gdp-deflator", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"nominal_gdp": 1100,
"real_gdp": 1000
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "econ.gdp_deflator",
"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. |
Technical notes
Input contract, response fields, and validation rules
Optionally send decimals as an integer from zero through twelve (default six) to control half-up rounding on every computed field. Both GDP levels must be strictly greater than zero: zero or negative real GDP would make division undefined or meaningless for a price index, and non-positive nominal GDP is rejected for the same classroom domain. POST a JSON body with two required finite numbers: nominal_gdp (current-price GDP) and real_gdp (constant-price GDP for the same period). Missing fields, empty strings, non-finite values, and non-integer decimals outside the allowed range fail with invalid_input and are not billed. Common aliases are accepted: nominal, ngdp, or gdp_nominal for nominal_gdp; real, rgdp, or gdp_real for real_gdp. On success the body returns the echoed nominal_gdp and real_gdp (rounded), ratio as nominal divided by real, gdp_deflator as one hundred times that ratio, vs_base_percent as the deflator minus one hundred (percentage points above or below the base-year index of one hundred), price_level_band as a coarse classroom label (below_base_year, at_base_year, or above_base_year), and formula. Example: nominal one thousand one hundred and real one thousand yields ratio one point one, GDP deflator one hundred ten, vs_base_percent ten, and above_base_year. Pair the numbers with your own multi-year table if you need period-to-period inflation as the percent change in the deflator; this endpoint computes only the level of the index for a single nominal–real pair and does not estimate growth rates or re-base historical series.
Where a GDP deflator API earns its keep
Principles and intermediate macro courses use a GDP deflator calculator so students can convert any valid nominal and real GDP pair into the canonical index without confusing it with CPI or with the inflation rate between two years. Exam generators and LMS plugins need a deterministic oracle that rejects zero or negative real GDP instead of inventing a hollow zero that a buggy grader might treat as a base year. Failed validation does not consume balance. Analyst notebooks and teaching dashboards often recompute textbook tables from published nominal and real series; pinning the arithmetic in a tiny parse API keeps spreadsheet drift out of the comparison column. Keep requests small, pin the rounded deflator and vs_base_percent fields in tests, and you get reproducible economy-wide price-index numbers for homework, LMS plugins, and edge workers without standing up a full national-accounts pipeline of your own.
Technical questions
Can the GDP deflator be below 100?
Yes. If current prices are lower than base-year prices on average, nominal GDP is below real GDP and the deflator is less than 100 (price_level_band below_base_year).
What does the GDP deflator calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.