Annual inflation rate for a year
get_inflation_rateReturns the official U.S. inflation rate for a calendar year from BLS CPI data: annual-average change (BLS annual averages, including the 2025 average published despite the missing October 2025 index), December-to-December change, and for the current year the latest 12-month rate. Years 1914 to the present for CPI-U and CPI-W, 1958 onward for core CPI.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| year | Yes | Calendar year, e.g. 2025. | |
| series | No | cpi_u (default, the headline CPI), cpi_w (wage earners, used for Social Security COLAs) or core (CPI-U less food and energy). |