GDP growth calculator
GDP that moves from 100 to 103 grew by 0.03, the 3% a news report would quote. Enter the earlier and the later figure to get the period-to-period growth rate and the change, ready for a briefing or an answer key. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Previous gdp
- 100
- Current gdp
- 103
- Change
- 3
- Growth rate
- 0.03
- Direction
- expansion
Gross domestic product growth is the relative change in measured GDP from one period to the next. Analysts, journalists, students, and policy desks recover that rate from two published figures: subtract previous GDP from current GDP, then divide by previous GDP. This GDP growth calculator accepts those two finite numbers, applies that identity, and returns the growth rate as a decimal, so a move from one hundred to one hundred three prints 0.03 rather than three percent. It does not fetch official series, annualize a multi-year gap, deflate nominal GDP into real GDP, or convert currencies.
What GDP growth tells you, in plain words
GDP growth answers one question: by what share did measured output change from one period to the next? You take the later GDP, subtract the earlier one and divide by the earlier one. The earlier figure is the base, so the order matters: going from 100 to 103 is growth of 0.03, while going back from 103 to 100 is a smaller share in the other direction. A positive result is an expansion, a negative one a contraction, and zero means the economy was unchanged on this measure. The answer comes as a decimal, such as 0.03, together with the raw change between the two figures; multiply the rate by 100 to read it as a percent.
Mistakes to avoid when comparing two GDP figures
Both figures must be measured the same way. Comparing a nominal figure with a real one, or two numbers in different currencies, mixes price or exchange-rate effects into what looks like growth. A change spread over several years is not an annual rate either, and turning it into one is a separate calculation, compound annual growth, that this tool does not perform. And a growth rate is not GDP per person, which also depends on population. When both figures come from the same official series, this calculation gives the period-to-period rate a release would report.
What you can do with it
Year-over-year GDP briefings
Turn two official GDP prints from a statistical release into the decimal growth rate a newsroom or research desk can quote after multiplying by one hundred.
Classroom and homework oracles
Generate reproducible growth-rate answer keys that reject a zero previous GDP instead of printing Infinity.
FAQ
Is the result a percent or a decimal?
A decimal. A move from 100 to 103 returns 0.03. Multiply by 100 yourself if you need a headline percent such as 3%.
How is the GDP growth rate calculated?
Subtract the earlier GDP from the later one and divide the difference by the earlier GDP. From 100 to 103, the change is 3 and the growth rate is 0.03, which you multiply by 100 to quote 3%.
What happens if the previous GDP is zero?
The calculation is refused, because the earlier figure is the divisor and growth from zero has no defined rate. Instead of showing an infinite or broken result, the tool asks you for a usable earlier figure.
What does a negative growth rate mean?
The economy contracted: the later GDP is below the earlier one. Equal figures mean no change. If measured output falls all the way to zero, the rate is −1, a contraction of 100%.
Does it give real or annual growth?
No. It compares exactly the two figures you enter. It does not remove inflation from nominal GDP, spread a multi-year change into a yearly rate, convert currencies or fetch official numbers, so enter two figures that are already comparable.
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/fin/gdp-growth \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"previous_gdp":100,"current_gdp":103}'const res = await fetch("https://api.kit.forhosting.com/fin/gdp-growth", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"previous_gdp": 100,
"current_gdp": 103
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/fin/gdp-growth",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"previous_gdp": 100,
"current_gdp": 103
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/fin/gdp-growth", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"previous_gdp":100,"current_gdp":103}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"previous_gdp":100,"current_gdp":103}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/fin/gdp-growth", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"previous_gdp": 100,
"current_gdp": 103
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "fin.gdp_growth",
"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
Previous GDP of zero is rejected with invalid_input because the rate is undefined.
What GDP growth means and how the decimal rate is defined
The GDP growth rate is the relative change in gross domestic product between two periods. A later GDP above the earlier GDP is expansion; a later GDP below the earlier GDP is contraction; identical levels mean the measured economy was unchanged on this measure. The previous level is the denominator, so it cannot be zero: dividing by zero is undefined, and this calculator rejects that case instead of returning Infinity or NaN. If previous_gdp is the level in the earlier period and current_gdp is the level in the later period, the identity is growth_rate equals current_gdp minus previous_gdp, divided by previous_gdp. That result is a decimal, not a percent: a rise from one hundred to one hundred three is 0.03, which a journalist would quote as three percent only after multiplying by one hundred. Current GDP may sit above, equal to, or below previous GDP, including zero, because a collapse of measured output is a real contraction of one hundred percent, which is a growth_rate of negative one. This tool does not annualize a multi-year gap, does not convert nominal GDP into real GDP, does not rebase one series onto another, and does not fetch official numbers from a statistical office. It evaluates the closed form on the two numbers you already have from a release, a textbook problem, or a spreadsheet. It is not an expenditure-approach GDP identity that sums consumption, investment, government spending, and net exports, and it is not a compound annual growth rate over n years: those are different searches and different jobs.
Input contract, response shape, and error behaviour
The value must be a finite number and must not be zero. Failed validation does not consume balance. POST a JSON body with two required finite numbers in the same currency and the same units. previous_gdp is the gross domestic product of the earlier period and is the denominator of the growth rate; aliases previous, gdp_previous, gdp0, earlier_gdp, and gdp_t0 are accepted so spreadsheets can keep familiar column names. If previous_gdp is missing, empty, infinite, or exactly zero, the task fails with invalid_input naming previous_gdp; a zero previous period is the contracted error and it is not billed. current_gdp is the gross domestic product of the later period; aliases current, gdp_current, gdp1, later_gdp, and gdp_t1 map to the same field. It must be a finite number and may be higher, equal, or lower than the earlier print. Each field may arrive as a JSON number or a numeric string. On success the body echoes previous_gdp and current_gdp, returns change as current minus previous rounded half-up to ten decimal places, returns growth_rate as the decimal rate rounded half-up to ten decimal places, sets direction to expansion, contraction, or unchanged according to the sign of the rate, and includes a formula string restating the identity. Example: previous one hundred and current one hundred three yields growth_rate 0.03, change three, and direction expansion. Previous twenty thousand and current eighteen thousand yields growth_rate negative 0.1 and direction contraction.
Where a GDP growth calculator earns its keep
Newsrooms, research desks, and classrooms use a GDP growth calculator when a statistical release prints two GDP levels and the question is the relative change, not a reconstruction of the expenditure identity that produced those levels. Households and students compare last year’s GDP with this year’s to see whether the measured economy expanded or contracted, without converting the decimal into a percent until they write the sentence. When you later need the level of GDP rather than its growth, or a multi-year compound rate, use those dedicated identities rather than stretching this two-print GDP growth contract. Product teams wire the same contract into briefing tools so a reporter who types two official prints sees the identical growth_rate the API will later return in a test suite. Keep requests small, pin the rounded growth_rate in tests, and you get reproducible decimal growth for worksheets, LMS plugins, and edge workers without standing up a national-accounts client of your own.
Integration use cases
Worksheet and CI fixtures
Pin growth_rate in a spreadsheet check or a test suite so a pipeline and a browser widget never disagree on the rounded decimal.
Technical questions
How do I calculate the GDP growth rate from two GDP values?
Send finite numbers previous_gdp (non-zero) and current_gdp. The API returns growth_rate = (current_gdp − previous_gdp) / previous_gdp as a decimal, plus the absolute change and a direction label.
What happens if previous GDP is zero?
The task fails with invalid_input naming previous_gdp. GDP growth is undefined when the previous period is zero, so the request is not billed.
Can current GDP be lower than previous GDP?
Yes. A later print below the earlier print is contraction: growth_rate is negative and direction is contraction. Equal prints return zero with direction unchanged.
What does the GDP growth calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.