Okun's law output gap calculator
This Okun's law output gap calculator estimates how far actual economic output lies above or below potential output by comparing the actual unemployment rate with the natural unemployment rate.
Run — free
Enter both rates as percentages and choose a positive Okun coefficient, or use the common default of 2. The calculator reports the unemployment gap in percentage points, the estimated output gap as a percentage, and a plain classification of whether actual output is below, above, or at potential. It is a compact scenario tool, not a forecast or a substitute for an economy-specific empirical model.
Turn an unemployment difference into an output-gap estimate
Okun's law describes an empirical relationship between labor-market slack and economic activity. In this calculator, the unemployment gap is the actual unemployment rate minus the natural unemployment rate. The estimated output gap is then the negative of that difference multiplied by the Okun coefficient: output gap = −β × (actual unemployment − natural unemployment). Suppose actual unemployment is 6.5%, natural unemployment is 4.5%, and β is 2. The unemployment gap is 2 percentage points, so the estimated output gap is −4%. The negative sign matters: unemployment above its natural rate is associated with actual output below potential output. If actual unemployment is below the natural rate, the unemployment gap becomes negative and the estimated output gap becomes positive. A zero difference produces a zero estimate. Rates are entered in percentage units, not decimal fractions, so enter 6.5 for 6.5%, rather than 0.065. The result is an estimated percentage gap, while the unemployment difference is explicitly reported in percentage points.
Choose and interpret the Okun coefficient carefully
The Okun coefficient controls how strongly the estimated output gap responds to a one-percentage-point unemployment gap. A coefficient of 2 means that each percentage point by which actual unemployment exceeds natural unemployment corresponds, under this simplified relationship, to output about 2% below potential. The default is useful for illustration, but there is no single universal coefficient. Estimates vary across countries, time periods, data frequencies, definitions, and statistical methods. A researcher may obtain a different coefficient from a gap model than from a changes model, and revisions to GDP or unemployment data can alter the fitted relationship. For serious analysis, use a coefficient estimated for the economy and period you are studying, and document its source. Scenario analysis is often more informative than presenting one number with false precision: run a low, central, and high coefficient while keeping the unemployment assumptions fixed. The calculator accepts only a positive coefficient because it applies the conventional negative sign itself. Do not enter a negative coefficient to force the direction; that would reverse the economic interpretation and double-count the sign convention.
Understand what the estimate can and cannot tell you
This result is a rule-of-thumb estimate, not a direct measurement of missing production. Both potential output and the natural unemployment rate are unobserved concepts that must be estimated, and those estimates can change substantially after new data or methodological revisions. Okun's relationship may also weaken during structural change, unusual labor-force movements, shifts in hours worked, productivity shocks, labor hoarding, or recoveries in which output and employment adjust at different speeds. Use the output as a transparent diagnostic for teaching, briefing, sensitivity analysis, or a first-pass macroeconomic scenario. Preserve the inputs and coefficient beside the result so readers can reproduce the calculation and challenge its assumptions. Avoid treating the estimate as a causal claim that changing unemployment alone will mechanically create the reported amount of output. For policy or investment decisions, compare it with production-function estimates, capacity-utilization measures, central-bank output-gap series, and uncertainty ranges. The API costs $0.002 per request, while the same deterministic calculation can run in the browser. No external data is fetched, so the quality and date of the assumptions remain the user's responsibility.
What you can do with it
Build a macroeconomic scenario
Translate assumed actual and natural unemployment rates into a transparent output-gap estimate for a baseline, upside, or downside case.
Check a policy briefing
Reproduce the arithmetic behind an Okun's law claim and make its coefficient and sign convention explicit.
Teach labor-market slack
Show students how a percentage-point unemployment gap maps to a percentage output gap under different coefficients.
FAQ
What formula does the calculator use?
It uses output gap (%) = −β × [actual unemployment (%) − natural unemployment (%)], where β is the positive Okun coefficient.
Why is the output gap negative when unemployment is high?
Actual unemployment above its natural rate indicates labor-market slack, which the conventional Okun relationship associates with actual output below potential.
Should I enter 6.5 or 0.065 for 6.5% unemployment?
Enter 6.5. Both unemployment inputs use percentage units, and their difference is reported in percentage points.
What Okun coefficient should I use?
Use an estimate appropriate to the country, time period, and model you are analyzing. The default of 2 is illustrative, not universal.
Is this a forecast of GDP?
No. It estimates a relative output gap from supplied assumptions; it does not fetch data, forecast GDP, or estimate the level of potential output.
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/okun-law-output-gap \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"actual_unemployment_percent":6.5,"natural_unemployment_percent":4.5}'const res = await fetch("https://api.kit.forhosting.com/econ/okun-law-output-gap", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"actual_unemployment_percent": 6.5,
"natural_unemployment_percent": 4.5
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/econ/okun-law-output-gap",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"actual_unemployment_percent": 6.5,
"natural_unemployment_percent": 4.5
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/econ/okun-law-output-gap", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"actual_unemployment_percent":6.5,"natural_unemployment_percent":4.5}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"actual_unemployment_percent":6.5,"natural_unemployment_percent":4.5}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/econ/okun-law-output-gap", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"actual_unemployment_percent": 6.5,
"natural_unemployment_percent": 4.5
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "econ.okun_law_output_gap",
"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. |