Table 1.1.6. Real Gross Domestic Product, Chained Dollars (A) (Q)

Data - BEA

Info

source dataset Title .html .rData
bea T10105 Table 1.1.5. Gross Domestic Product (A) (Q) 2026-07-25 2026-07-25
bea T10106 Table 1.1.6. Real Gross Domestic Product, Chained Dollars (A) (Q) 2026-07-25 2026-07-25

Data on US macro

source dataset Title .html .rData
fred gdp Gross Domestic Product 2026-07-24 2026-07-24
fred unr Unemployment - unr 2026-07-24 2026-07-24
oecd QNA Quarterly National Accounts 2026-07-24 2026-07-24
oecd SNA_TABLE1 Gross domestic product (GDP) 2026-07-24 2025-05-24

LAST_COMPILE

LAST_COMPILE
2026-07-26

Last

date Nobs
2024-12-31 27

Layout

  • NIPA Website. html

Basic Macroeconomic Facts

U.S. Real GDP (1929-2019)

Linear

Code
plot_linear <- T10106 %>% filter(FREQ == "A") %>%
  year_to_date %>%
  filter(LineNumber == 1) %>%
  ggplot(.) + xlab("") + ylab("U.S. Real GDP") +
  geom_line(aes(x = date, y = DataValue/1000000)) +
  theme_minimal() +
  scale_x_date(breaks = nber_recessions$Peak,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = 1*seq(0, 50, 2.5),
                     labels = scales::dollar_format(accuracy = 0.1, suffix = "Tn")) + 
  geom_rect(data = nber_recessions %>%
              filter(Peak > as.Date("1928-01-01")), 
            aes(xmin = Peak, xmax = Trough, ymin = 0, ymax = +Inf), 
            fill = 'grey', alpha = 0.5)

plot_linear

Log

Code
plot_log <- plot_linear +
  scale_y_log10(breaks = 20*2^seq(-7, 1, 1),
                labels = scales::dollar_format(accuracy = 0.1, suffix = "Tn")) + 
  geom_rect(data = nber_recessions %>%
              filter(Peak > as.Date("1928-01-01")), 
            aes(xmin = Peak, xmax = Trough, ymin = 0, ymax = +Inf), 
            fill = 'grey', alpha = 0.5)

plot_log

Bind

Code
ggpubr::ggarrange(plot_linear + ggtitle("Linear Scale"), plot_log + ggtitle("Log Scale"))

Other

Quarterly

All

Code
T10106 %>% filter(FREQ == "Q") %>%
  quarter_to_date %>%
  filter(LineNumber == 1) %>%
  ggplot(.) + xlab("") + ylab("U.S. Real GDP") +
  geom_line(aes(x = date, y = DataValue/1000000)) +
  theme_minimal() +
  scale_x_date(breaks = nber_recessions$Peak,
               labels = date_format("%Y")) +
  scale_y_log10(breaks = 20*2^seq(-7, 1, 1),
                labels = scales::dollar_format(accuracy = 0.1, suffix = "Tn")) + 
  geom_rect(data = nber_recessions %>%
              filter(Peak > as.Date("1945-01-01")), 
            aes(xmin = Peak, xmax = Trough, ymin = 0, ymax = +Inf), 
            fill = 'grey', alpha = 0.5)

1970-

Code
T10106 %>% filter(FREQ == "Q") %>%
  quarter_to_date %>%
  filter(LineNumber == 1,
         date >= as.Date("1970-01-01")) %>%
  ggplot(.) + xlab("") + ylab("U.S. Real GDP") +
  geom_line(aes(x = date, y = DataValue/1000000)) +
  theme_minimal() +
  scale_x_date(breaks = c(nber_recessions$Peak),
               labels = date_format("%Y")) +
  scale_y_log10(breaks = 20*2^seq(-7, 1, 0.2),
                labels = scales::dollar_format(accuracy = 0.1, suffix = "Tn")) + 
  geom_rect(data = nber_recessions %>%
              filter(Peak > as.Date("1970-01-01")), 
            aes(xmin = Peak, xmax = Trough, ymin = 0, ymax = +Inf), 
            fill = 'grey', alpha = 0.5)

1990-

Code
T10106 %>% filter(FREQ == "Q") %>%
  quarter_to_date %>%
  filter(LineNumber == 1,
         date >= as.Date("1990-01-01")) %>%
  ggplot(.) + xlab("") + ylab("U.S. Real GDP") +
  geom_line(aes(x = date, y = DataValue/1000000)) +
  theme_minimal() +
  scale_x_date(breaks = c(nber_recessions$Peak),
               labels = date_format("%Y")) +
  scale_y_log10(breaks = 20*2^seq(-7, 1, 0.1),
                labels = scales::dollar_format(accuracy = 0.1, suffix = "Tn")) + 
  geom_rect(data = nber_recessions %>%
              filter(Peak > as.Date("1990-01-01")), 
            aes(xmin = Peak, xmax = Trough, ymin = 0, ymax = +Inf), 
            fill = 'grey', alpha = 0.5)

2005-

Code
T10106 %>% filter(FREQ == "Q") %>%
  quarter_to_date %>%
  filter(LineNumber == 1,
         date >= as.Date("2005-01-01")) %>%
  ggplot(.) + xlab("") + ylab("U.S. Real GDP") +
  geom_line(aes(x = date, y = DataValue/1000000)) +
  theme_minimal() +
  scale_x_date(breaks = "2 years",
               labels = date_format("%Y")) +
  scale_y_log10(breaks = 20*2^seq(-7, 1, .1),
                labels = scales::dollar_format(accuracy = 0.1, suffix = "Tn")) + 
  geom_rect(data = nber_recessions %>%
              filter(Peak > as.Date("2005-01-01")), 
            aes(xmin = Peak, xmax = Trough, ymin = 0, ymax = +Inf), 
            fill = 'grey', alpha = 0.5)

U.S. Real GDP Cycle (1929-2019)

Code
T10106 %>% filter(FREQ == "A") %>%
  year_to_date %>%
  filter(LineNumber == 1) %>%
  select(date, `Real GDP` = DataValue) %>%
  mutate(`Real GDP` = `Real GDP` / 1000000,
         year = year(date)) %>%
  mutate(`HP (1000) Cycle` = exp(hpfilter(log(`Real GDP`), freq = 1000, type = "lambda", drift = FALSE)$cycle),
         `HP (10000) Cycle` = exp(hpfilter(log(`Real GDP`), freq = 10000, type = "lambda", drift = FALSE)$cycle),
         `Log-Linear Cycle` = exp(residuals(lm(log(`Real GDP`) ~ year, na.action = na.exclude)))) %>%
  group_by(date) %>%
  select(-year, - `Real GDP`) %>%
  gather(variable, value, -date) %>%
  ggplot(.) + geom_line(aes(x = date, y = value, color = variable, linetype = variable)) + theme_minimal() +
  theme(legend.title = element_blank(),
        legend.position = c(0.8, 0.8)) +
  geom_rect(data = nber_recessions %>%
              filter(Peak > as.Date("1928-01-01")), 
            aes(xmin = Peak, xmax = Trough, ymin = -Inf, ymax = +Inf), 
            fill = 'grey', alpha = 0.5) + 
  scale_x_date(breaks = nber_recessions$Peak,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0.60, 1.40, 0.05),
                     labels = scales::percent_format(accuracy = 1)) + 
  xlab("") + ylab("GDP Cycle (% of Trend)")

U.S. Real GDP

Code
fit <- T10106 %>% filter(FREQ == "A") %>%
  year_to_date %>%
  filter(LineNumber == 1) %>%
  select(date, `Real GDP` = DataValue) %>%
  mutate(`Real GDP` = `Real GDP` / 1000000,
         year = year(date)) %>%
  filter(year <= 1971) %>%
  lm(log(`Real GDP`) ~ year, data = .) %>%
  pluck("coefficients")

fit_2019 <- T10106 %>% filter(FREQ == "A") %>%
  year_to_date %>%
  filter(LineNumber == 1) %>%
  select(date, `Real GDP` = DataValue) %>%
  mutate(`Real GDP` = `Real GDP` / 1000000,
         year = year(date)) %>%
  lm(log(`Real GDP`) ~ year, data = .) %>%
  pluck("coefficients")

fit_1929_1971 <- T10106 %>% filter(FREQ == "A") %>%
  year_to_date %>%
  filter(LineNumber == 1) %>%
  select(date, `Real GDP` = DataValue) %>%
  mutate(`Real GDP` = `Real GDP` / 1000000,
         year = year(date)) %>%
  filter(year <= 1971) %>%
  lm(log(`Real GDP`) ~ year, data = .) %>%
  pluck("coefficients")

fit_1929_1971
#  (Intercept)         year 
# -83.52871738   0.04327969
Code
fit_1972_2019 <- T10106 %>% filter(FREQ == "A") %>%
  year_to_date %>%
  filter(LineNumber == 1) %>%
  select(date, `Real GDP` = DataValue) %>%
  mutate(`Real GDP` = `Real GDP` / 1000000,
         year = year(date)) %>%
  filter(year >= 1972) %>%
  lm(log(`Real GDP`) ~ year, data = .) %>%
  pluck("coefficients")

U.S. Real GDP Cycles (1929-2019)

(ref:us-real-gdp-nipa-cycle) U.S. Real GDP Cycles (1929-2019).

Code
T10106 %>% filter(FREQ == "A") %>%
  year_to_date %>%
  filter(LineNumber == 1) %>%
  select(date, `Real GDP` = DataValue) %>%
  mutate(`Real GDP` = `Real GDP` / 1000000,
         year = year(date)) %>%
  mutate(`Cycle, Detrending to 2019 (g = 3.5%)` = lm(log(`Real GDP`) ~ year) %>% residuals %>% exp,
         `Cycle, Detrending to 1971, extrapolated` = ifelse(year >= 1971, exp(log(`Real GDP`) - fit[1] - fit[2] * year), NA),
         `Cycle, Detrending to 1971 (g = 4.1%)` = ifelse(year <= 1971, exp(log(`Real GDP`) - fit[1] - fit[2] * year), NA)) %>%
  group_by(date) %>%
  select(-year, -`Real GDP`) %>%
  gather(variable, value, -date) %>%
  ggplot(.) + geom_line(aes(x = date, y = value, color = variable, linetype = variable)) + 
  theme_minimal() +
  scale_color_manual(values = c(viridis(4)[1],viridis(4)[1], viridis(4)[2])) +
  scale_linetype_manual(values = c("solid", "dashed", "solid")) +
  theme(legend.title = element_blank(),
        legend.position = c(0.7, 0.8)) +
  scale_x_date(breaks = nber_recessions$Peak,
               labels = date_format("%Y")) +
  scale_y_continuous(breaks = seq(0, 2.25, 0.10),
                labels = scales::percent_format(accuracy = 1),
                limits = c(0.4, 1.55)) + 
  geom_rect(data = nber_recessions %>%
              filter(Peak > as.Date("1928-01-01")), 
            aes(xmin = Peak, xmax = Trough, ymin = -Inf, ymax = +Inf), 
            fill = 'grey', alpha = 0.5) + 
  xlab("") + ylab("U.S. Real GDP, $2012")

(ref:us-real-gdp-nipa-cycle)

Compare two part-linear and quadratic

Code
dataset <- T10106 %>% filter(FREQ == "A") %>%
  year_to_date %>%
  filter(LineNumber == 1) %>%
  select(date, `Real GDP` = DataValue) %>%
  mutate(`Real GDP` = `Real GDP` / 1000000,
         year = year(date)) %>%
  select(year, `Real GDP`)
  
fit <- dataset %>%
  filter(year <= 1971) %>%
  lm(log(`Real GDP`) ~ year, data = .) %>%
  pluck("coefficients")

fit_2019 <- dataset %>%
  lm(log(`Real GDP`) ~ year, data = .) %>%
  pluck("coefficients")

fit_1929_1971 <- dataset %>%
  filter(year <= 1971) %>%
  lm(log(`Real GDP`) ~ year, data = .) %>%
  pluck("coefficients")

fit_1972_2019 <- dataset %>%
  filter(year >= 1972) %>%
  lm(log(`Real GDP`) ~ year, data = .) %>%
  pluck("coefficients")

Residuals

Code
ssq1 <- dataset %>%
  lm(log(`Real GDP`) ~ year, data = .) %>%
  pluck("residuals") %>%
  norm(., type = "2")

ssq2 <- dataset %>%
  mutate(year2 = year^2) %>%
  lm(log(`Real GDP`) ~ year + year2, data = .) %>%
  pluck("residuals") %>%
  norm(., type = "2")

ssq3a <- dataset %>%
  filter(year >= 1972) %>%
  lm(log(`Real GDP`) ~ year, data = .) %>%
  pluck("residuals") %>%
  norm(., type = "2")

ssq3b <- dataset %>%
  filter(year <= 1971) %>%
  lm(log(`Real GDP`) ~ year, data = .) %>%
  pluck("residuals") %>%
  norm(., type = "2")

ssq1
# [1] 1.378504
Code
ssq2
# [1] 0.7931693
Code
ssq3a + ssq3b
# [1] 1.13777

1938, 1958, 1978, 1998, 2018 Table

Percent

Code
T10106 %>%
  filter(FREQ == "A") %>%
  select(-FREQ) %>%
  year_to_date %>%
  mutate(year = year(date)) %>%
  filter(year %in% c(1938, 1958, 1978, 1998, 2018)) %>%
  group_by(year) %>%
  mutate(value = round(100*DataValue/DataValue[1], 1)) %>%
  ungroup %>%
  select(2, 3, 6, 7) %>%
  spread(year, value) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

Billions

Code
T10106 %>% filter(FREQ == "A") %>%
  select(-FREQ) %>%
  year_to_date %>%
  mutate(year = year(date)) %>%
  filter(year %in% c(1938, 1958, 1978, 1998, 2018)) %>%
  group_by(year) %>%
  mutate(value = round(DataValue/1000)) %>%
  ungroup %>%
  select(2, 3, 6, 7) %>%
  spread(year, value) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}