US GDP for 2026-Q2 grew 0.55% on the quarter and 2.2% on the year. Growth from levels is the later level divided by the earlier level minus one. Narwhal's GDP levels are at current prices, so this calculation includes price changes; for real growth, use the GDP growth endpoint.
Do it with the API
Use the GDP observations endpoint for the levels and the GDP growth endpoint for real growth. The Python example requests US levels starting at 2026-Q1 and real growth for 2026-Q2, so both calculations refer to the same quarter. Keep those period labels attached to the results when you compare them. Each observation's value is a GDP level in USD. The growth response reports percentages, so read the units alongside the field names: a level and a growth percentage describe different measures of the economy.
- Set your API key Get a free API key and put it in the
NARWHAL_API_KEYenvironment variable. The script reads that variable and sends the key in theAuthorization: Bearer YOUR_KEYheader. - Request the levels and real growth Use the Python script to retrieve GDP observations and the real growth response. It keeps the observations by period so the ratio uses the second quarter of 2026 as the numerator and the first quarter as the denominator.Python, nominal growth from levels and real growth from the API
import os import requests H = {"Authorization": f"Bearer {os.environ['NARWHAL_API_KEY']}"} API = "https://api.narwhalapi.com/v1/economics/USA" gdp = {o["period"]: float(o["value"]) for o in requests.get(f"{API}/gdp/observations", params={"start": "2026-Q1"}, headers=H, timeout=10).json()["observations"]} growth = requests.get(f"{API}/gdp-growth", params={"period": "2026-Q2"}, headers=H, timeout=10).json() q = gdp["2026-Q2"] / gdp["2026-Q1"] - 1 print(f"nominal GDP, Q2 vs Q1: {q:.2%} as an annual rate: {(1 + q) ** 4 - 1:.2%}") print(f"real GDP growth from the API: {growth['quarter_over_quarter']}% on the quarter, {growth['year_over_year']}% on the year") - Read the nominal calculation The variable
qholds the change between the quarterly levels, and the first print statement expresses it as a percentage. Its annual-rate calculation compounds that same quarterly change; it does not remove the price changes included in the levels. - Read the real growth response The
quarter_over_quarterfield is real growth in percent and is not annualised. Theyear_over_yearfield gives the real year-on-year percentage, so use the field that matches the span you want to compare.
Do it in a sheet or without code
Put the earlier quarter's GDP level in B2 and the later quarter's level in B3. For the US second-quarter 2026 comparison, B2 holds the first-quarter level of 31,906,274,000,000 USD and B3 holds the second-quarter level of 32,563,030,000,000 USD. These are the same levels used in the Python calculation. Divide the later value by the earlier value, then subtract one. Format the result as a percentage so the sheet expresses the change in the same form as the worked example. The formula refers to the cells, so keep their order consistent with the periods you intend to compare.
=B3/B2-1To express that quarterly change as an annual rate, use the following formula on the same cells. Keep the full levels in the cells for either calculation; the annual-rate formula works directly from their ratio.
=(B3/B2)^4-1For year-on-year growth, divide by the level four quarters earlier and subtract one. That changes the comparison period. It still uses current-price levels, so the result remains nominal growth even though the span is a year.
Which option to use when
| Situation | Best option | Why |
|---|---|---|
| Real growth, as headlines report it | The GDP growth endpoint | It provides real growth at constant prices. |
| Nominal growth or growth over a custom span | GDP levels | Divide the level at the end of your span by the earlier level and subtract one. |
| Removing inflation from nominal growth | A price index | This requires a price index rather than a rough subtraction of an inflation rate. |
Why is GDP growth from levels different from the headline?
The levels include price growth because they are at current prices, while the headline measure is real growth at constant prices. The GDP growth endpoint gives the real comparison when you want growth with that component removed.
For the second quarter of 2026, the nominal quarter-on-quarter result is 2.06% and the real result is 0.55%. Their difference is 1.51 percentage points. That gap reflects the price growth inside the current-price levels; subtracting an inflation rate roughly is not a substitute for using a price index.
Should I annualise quarterly GDP growth?
Annualise only when you want an annual-rate comparison. The US headline figure is often quoted annualised, while the API's quarter_over_quarter field is not annualised. Match the rate convention as well as the quarter before comparing figures.
GDP observations carry annualized: true because each level is expressed at an annual rate. Dividing one quarterly level by another still gives the quarter-on-quarter change. Raising that ratio to the fourth power and subtracting one expresses the change as an annual rate; it does not give year-on-year growth.
Can I use nominal GDP to measure the economy's size?
Yes, the GDP levels measure nominal size in USD at current prices. Use the level when you need that size, or compare levels when you need its nominal change over a chosen span. For a volume growth comparison, use the GDP growth endpoint's real growth figures.
Worked example: US second quarter 2026
Start with the US GDP levels for the first and second quarters of 2026. Both values are in USD at an annual rate. Divide the second-quarter value by the first-quarter value before subtracting one or expressing the change as an annual rate.
The second-quarter level divided by the first-quarter level gives a ratio of 1.020583. Subtract one from the quotient to get the nominal change, then express it as a percentage: 2.06% for the second quarter of 2026 over the first quarter. Use the full levels for the calculation and retain the unrounded quotient for the annual-rate calculation.
To express that US second-quarter 2026 change as an annual rate, raise the unrounded quotient to the fourth power and subtract one. The result is 8.49%. Separately, the real quarter-on-quarter growth field for 2026-Q2 is 0.55%. Compare the nominal quarterly figure with that real quarterly figure: 2.06% minus 0.55% gives a gap of 1.51 percentage points.
| Calculation or measure | US second quarter 2026 comparison |
|---|---|
| First-quarter 2026 level | 31,906,274,000,000 USD |
| Second-quarter 2026 level | 32,563,030,000,000 USD |
| Second-quarter level / first-quarter level | 32,563,030,000,000 / 31,906,274,000,000 = 1.020583 |
| Nominal quarter-on-quarter growth | 2.06% |
| Nominal growth as an annual rate | 8.49% |
| Real quarter-on-quarter growth | 0.55% |
| Nominal minus real growth | 2.06% minus 0.55% = 1.51 percentage points |
Published .
