App-CalcAccumulatedInflation
view release on metacpan or search on metacpan
script/calc-accumulated-inflation view on Meta::CPAN
| 1.3103 | 17.11% | 3 |
| 1.3968 | 6.60% | 4 |
| 1.4889 | 6.59% | 5 |
| 1.6536 | 11.06% | 6 |
| 1.6995 | 2.78% | 7 |
| 1.8178 | 6.96% | 8 |
| 1.8867 | 3.79% | 9 |
| 1.9678 | 4.30% | 10 |
| 2.1327 | 8.38% | 11 |
| 2.3110 | 8.36% | 12 |
+--------+--------+------+
How much will your $100,000 grow over the next 10 years, if the savings rate is 4%; assuming this year is 2021:
% calc-accumulated-inflation --base-index 100000 --base-year 2021 --yearly-rate 4 --years 10
+-------------+------+
| index | year |
+-------------+------+
| 100000 | 2021 |
| 104000.0000 | 2022 |
| 108160.0000 | 2023 |
| 112486.4000 | 2024 |
| 116985.8560 | 2025 |
| 121665.2902 | 2026 |
| 126531.9018 | 2027 |
| 131593.1779 | 2028 |
| 136856.9050 | 2029 |
| 142331.1812 | 2030 |
| 148024.4285 | 2031 |
+-------------+------+
=head1 DESCRIPTION
This routine generates a table of accumulated inflation over a period of several
years. You can either specify a fixed rate for every years (C<yearly_rate>), or
specify each year's rates (C<rates>). You can also optionally set base index
(default to 1) and base year (default to 0).
=head1 OPTIONS
C<*> marks required options.
=head2 Main options
=over
=item B<--base-index>=I<s>
Default value:
1
=item B<--base-year>=I<s>
Default value:
0
=item B<--rates-json>=I<s>
Different rates for each year, in percent (JSON-encoded).
See C<--rates>.
=item B<--rates>=I<s@>
Different rates for each year, in percent.
Can be specified multiple times.
=item B<--yearly-rate>=I<s>, B<-y>
A single rate for every year, in percent.
=item B<--years>=I<s>
Default value:
10
=back
=head2 Configuration options
=over
=item B<--config-path>=I<s>, B<-c>
Set path to configuration file.
=item B<--config-profile>=I<s>, B<-P>
Set configuration profile to use.
=item B<--no-config>, B<-C>
Do not use any configuration file.
=back
=head2 Environment options
=over
=item B<--no-env>
Do not read environment for default options.
=back
=head2 Output options
=over
=item B<--format>=I<s>
Choose output format, e.g. json, text.
Default value:
undef
=item B<--json>
Set output format to json.
=item B<--naked-res>
When outputing as JSON, strip result envelope.
Default value:
0
( run in 0.835 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )