Inflation Since 2020: What Your Money Buys Now
Consumer prices since January 2020: inflation right now, the 2022 peak, what $100 then buys today, and the raise you needed to keep up. Official CPI data, pulled fresh.
4 steps · shared by Klajdi · September 25, 2026
No data is shared in this template. It contains only the recipe — column names and SQL logic. When you run it, your data is processed in your own browser and never leaves your machine.
How it works — every step, readable
- 01Consumer Price Index (CPI-U), monthly
SELECT * FROM read_csv_auto('FRED_CPIAUCSL.csv', header=true) - 02Assumptions — edit these
SELECT * FROM (VALUES ('Your salary in January 2020', 60000, 'USD')) AS t(assumption, value, unit) - 03Inflation, year over yearcomputes running / windowed totals · sorts the output
SELECT date, ROUND(100.0 * (cpiaucsl_idx / LAG(cpiaucsl_idx, 12) OVER (ORDER BY date) - 1), 2) AS inflation_yoy_pct FROM input_1 QUALIFY date >= DATE '2020-01-01' ORDER BY date - 04The punch linesbuckets values by condition · computes running / windowed totals · appends result sets (e.g. a TOTAL row)
WITH c AS (SELECT date, cpiaucsl_idx AS i, 100.0 * (cpiaucsl_idx / LAG(cpiaucsl_idx, 12) OVER (ORDER BY date) - 1) AS yoy FROM input_1), b AS (SELECT (SELECT i FROM c WHERE date = DATE '2020-01-01') AS i0, arg_max(i, date) AS i1, arg_max(date, date) AS d1, arg_max(yoy, date) AS yoy1, max(yoy) FILTER (WHERE date >= DATE '2020-01-01') AS peak, arg_max(date, yoy) FILTER (WHERE date >= DATE '2020-01-01') AS peak_d FROM c), a AS (SELECT MAX(CASE WHEN assumption = 'Your salary in January 2020' THEN CAST(value AS DOUBLE) END) AS sal FROM input_2) SELECT area, finding, next_step FROM ( SELECT 1 AS o, 'VERDICT' AS area, 'PRICES ARE UP ' || printf('%.1f%%', 100 * (i1 / i0 - 1)) || ' SINCE JANUARY 2020 — $100 then buys ' || ('$' || format('{:,}', CAST(ROUND(100 * i0 / i1) AS BIGINT))) || ' of the same things today' AS finding, '' AS next_step FROM b UNION ALL SELECT 2, 'Inflation right now', printf('%.1f%%', yoy1) || ' a year', 'CPI for ' || strftime(d1, '%B %Y') FROM b UNION ALL SELECT 3, 'The peak', printf('%.1f%%', peak) || ' in ' || strftime(peak_d, '%B %Y'), 'The highest in four decades' FROM b UNION ALL SELECT 4, '$100 from January 2020', 'Now costs ' || ('$' || format('{:,}', CAST(ROUND(100 * i1 / i0) AS BIGINT))), 'Same basket of goods and services' FROM b UNION ALL SELECT 5, 'Your raise to keep up', ('$' || format('{:,}', CAST(ROUND(sal) AS BIGINT))) || ' → ' || ('$' || format('{:,}', CAST(ROUND(sal * i1 / i0) AS BIGINT))), 'Change your 2020 salary in the assumptions' FROM b, a UNION ALL SELECT 6, 'At today''s pace', 'Prices double in ' || CAST(ROUND(72.0 / NULLIF(yoy1, 0)) AS INTEGER) || ' years', 'Rule of 72' FROM b ) ORDER BY o
Run this on your books
Free to try — no sign-up, no card. The workflow runs in your browser; your data never leaves your machine.
Make it your own →