inflation-cpi
v0.0.1
Published
Convert dollar amounts between years using BLS CPI figures
Downloads
2
Readme
inflation-cpi
Convert dollar amounts between years using BLS CPI figures
Sources
- Annual CPI figures going from 1913 to 2015
- The BLS inflation calculator
- Example of how to calculate inflation using the CPI index
Installation
npm install inflation-cpi
Usage
var inflation = require("inflation-cpi");
// examples from http://www.usinflationcalculator.com/frequently-asked-questions-faqs/
var twenty_dollars_in_1980 = inflation(
1980, // target year
2011, // original year
20 // amount
);
// 7.32
var movie_ticket_inflation = inflation(
2011, // target year
1970, // original year
0.5 // amount
);
// 2.90