This template calculates inflation based on several inflation index data sets.
Ахәҭаҷ/асекциа адырра апроцесс аԥсуа бызшәа аиҭагара ахь. Абызшәа адырра шәазҟазазар, ишәылшоит шәхы алашәырхәыр. |
Do not assume that using this template will mean that a calculated value is "current", "as of 2024", "as of 2023" or even necessarily "recent". Per MOS:REALTIME, statements made using this template should either specify an end_year , or rely on |fmt=eq or {{Inflation/year}} to automatically indicate the latest year this template provides an inflation calculation. Do not use {{CURRENTYEAR}} . |
The template uses an identification code for an inflation index
(usually a country code), an original value
, an original start_year
and either a specific reference end_year
or by default the latest currently available end year, and calculates the equivalent value from historical economic changes between the original and reference years. For example, this template calls the United States inflation table located in the sub-template Template:Inflation/US/dataset to perform the U.S. calculation.
Aside from a convenient way to calculate values from different specified time periods, this template allows a regularly automatically updated calculation of value based on the most recent available inflation data. Whenever inflation tables are updated, potentially annually, all articles using this template have their displayed values updated accordingly.
{{Inflation|index|value|start_year}}
{{Inflation|index|value|start_year|end_year}}
{{Inflation|index|value|start_year|r=decimals|fmt=c}}
{{Inflation|index|value|start_year|r=decimals|fmt=eq}}
{{Inflation|index|value|start_year|r=decimals|fmt=eq|cursign=X}}
The supported countries are listed below, with their index
and available data periods:
index | Country | start_year minimum | end_year maximum |
---|---|---|---|
AR | Argentina | Ашаблон:Inflation/AR/startyear | 2020 |
AT | Austria | Ашаблон:Inflation/AT/startyear | 2018 |
AU | Australia | Ашаблон:Inflation/AU/startyear | 2018 |
AU-road | Australia [...?] | Ашаблон:Inflation/AU-road/startyear | 2018 |
BD | Bangladesh | Ашаблон:Inflation/BD/startyear | 2021 |
BE | Belgium | Ашаблон:Inflation/BE/startyear | 2020 |
BR | Brazil | Ашаблон:Inflation/BR/startyear | 2020 |
CA | Canada | Ашаблон:Inflation/CA/startyear | 2021 |
CH | Switzerland | Ашаблон:Inflation/CH/startyear | 2021 |
CL | Chile | Ашаблон:Inflation/CL/startyear | 2020 |
CN | China | Ашаблон:Inflation/CN/startyear | 2019 |
DE | Germany[анеишьа амам азхьарԥш] | Ашаблон:Inflation/DE/startyear | 2021 |
DK | Denmark | Ашаблон:Inflation/DK/startyear | 2007 |
EG | Egypt | Ашаблон:Inflation/EG/startyear | 2018 |
ES | Spain | Ашаблон:Inflation/ES/startyear | 2019 |
EU | Euro (European Union) | Ашаблон:Inflation/EU/startyear | 2021 |
FI | Finland | Ашаблон:Inflation/FI/startyear | 2007 |
FR | France | Ашаблон:Inflation/FR/startyear | 2020 |
GR | Greece | Ашаблон:Inflation/GR/startyear | 2007 |
HK | Hong Kong | Ашаблон:Inflation/HK/startyear | 2020 |
ID | Indonesia | Ашаблон:Inflation/ID/startyear | 2007 |
IL | Israel | Ашаблон:Inflation/IL/startyear | 2021 |
IN | India | Ашаблон:Inflation/IN/startyear | 2020 |
IR | Iran | Ашаблон:Inflation/IR/startyear | 1398 |
IS | Iceland | Ашаблон:Inflation/IS/startyear | 2020 |
IT | Italy | Ашаблон:Inflation/IT/startyear | 2020 |
JP | Japan | Ашаблон:Inflation/JP/startyear | 2019 |
MX | Mexico | Ашаблон:Inflation/MX/startyear | 2007 |
NL | Netherlands | Ашаблон:Inflation/NL/startyear | 2016 |
NO | Norway | Ашаблон:Inflation/NO/startyear | 2017 |
NZ | New Zealand | Ашаблон:Inflation/NZ/startyear | 2021 |
PE | Peru | Ашаблон:Inflation/PE/startyear | 2017 |
PH | Philippines | Ашаблон:Inflation/PH/startyear | 2021 |
PK | Pakistan | Ашаблон:Inflation/PK/startyear | 2021 |
PL | Poland | Ашаблон:Inflation/PL/startyear | 2021 |
PT | Portugal | Ашаблон:Inflation/PT/startyear | 2007 |
RU | Russia | Ашаблон:Inflation/RU/startyear | 2007 |
SE | Sweden | Ашаблон:Inflation/SE/startyear | 2009 |
SG | Singapore | Ашаблон:Inflation/SG/startyear | 2020 |
TH | Thailand | Ашаблон:Inflation/TH/startyear | 2020 |
TR | Turkey | Ашаблон:Inflation/TR/startyear | 2021 |
TW | Taiwan | Ашаблон:Inflation/TW/startyear | 2021 |
UK | United Kingdom | Ашаблон:Inflation/UK/startyear | 2021 |
UK-GDP | United Kingdom GDP deflator | Ашаблон:Inflation/UK-GDP/startyear | 2019 |
US | United States | Ашаблон:Inflation/US/startyear | 2021 |
US-GDP | United States GDP deflator | Ашаблон:Inflation/US-GDP/startyear | 2021 |
ZAR | South Africa | Ашаблон:Inflation/ZAR/startyear | 2018 |
KRW | South Korea | Ашаблон:Inflation/KRW/startyear | 2017 |
|index=
(parameter 1), required, an index code for one of several available inflation indexes.|value=
(parameter 2), required, original price or value from which to base the inflation calculation on. Will ignore any commas, but must not have a currency symbol.|start_year=
(parameter 3), required, original year from which to base the inflation calculation on. Must be a year available in the chosen inflation index. As an exception to this, if the current year is specified and no end_year
is specified, the template will output value
unchanged, as it can be assumed an inflation of zero.|end_year=
(parameter 4), optional, reference year for which to calculate inflation. Must be higher (later) than start_year
, but not higher than the highest (most recent) year available in the chosen inflation index, and will default to the highest (most recent) available year if omitted.|r=digit
sets the digits to which the value must be rounded. A negative value indicates rounding to an upper significant digit, and a positive value indicates a fractional digit including trailing zeros. Defaults to 0
, i.e., without cents.|fmt=c
will insert thousands separator commas into the calculated value.|fmt=eq
will show an equivalent-to phrase, in the format, "Ашаблон:Xtn". Uses thousands separator commas. |cursign=
will set the currency symbol to be shown. Only functions when |fmt=eq
is used. Can use advanced symbol formats, but can only precede the calculated value. Default is $
.|orig=yes
will display the original value too, with the currency sign provided.{{Inflation|KRW|100|2000}}
→ Ошибка выражения: неопознанный символ пунктуации «[»{{Inflation|DE|100|2000}}
→ Ошибка выражения: неопознанный символ пунктуации «[»{{Inflation|US|595|1982}}
→ Ошибка выражения: неопознанный символ пунктуации «[»{{Inflation|US|595|1982|fmt=eq}}
→ Ошибка выражения: неопознанный символ пунктуации «[»{{Inflation|US|800|1942|fmt=eq|r=-3}}
→ Ошибка выражения: неопознанный символ пунктуации «[»{{Inflation|US|100|2010|2012|fmt=eq|r=2}}
→ Ошибка выражения: неопознанный символ пунктуации «[»US$595 ({{Inflation|US|595|1982|fmt=eq}})
→ US$595 (Ошибка выражения: неопознанный символ пунктуации «[»)US$595 ({{Inflation|US|595|1982|fmt=eq|cursign=[[United States dollar|US$]]}})
→ US$595 (Ошибка выражения: неопознанный символ пунктуации «[»)$21 million (equivalent to ${{Inflation|US|21|2005|r=2}} million in {{Inflation/year|US}})
→ $21 million (equivalent to $Ошибка выражения: неопознанный символ пунктуации «[» million in 2021){{Inflation|UK|1|1209|fmt=eq|cursign=£}}
→ Ошибка выражения: неопознанный символ пунктуации «[»{{Inflation|AU|100|2024|fmt=eq}}
→ Ошибка выражения: неопознанный символ пунктуации «[»${{Inflation|US|100|2024}} in {{Inflation/year|US}}
→ $Ошибка выражения: неопознанный символ пунктуации «[» in 2021{{Inflation|UK|100|1982|fmt=eq|orig=yes|cursign=£}}
→ Ошибка выражения: неопознанный символ пунктуации «[»)It is possible to use the template in incorrect ways without producing error messages. Please read the warnings and appropriate uses of this template at the beginning of the template description.
Ашаблон:!mxt
→ Ошибка выражения: неопознанный символ пунктуации «[» (Omitting the |cursign=
parameter will show the $ symbol by default, which is the wrong currency symbol for British currency){{Inflation|UK|10|1971|fmt=eq|cursign=£}}
→ Ошибка выражения: неопознанный символ пунктуации «[»Ашаблон:!mxt
→ $595 ($Ошибка выражения: неопознанный символ пунктуации «[» today) (Misleading time reference)Ашаблон:!mxt
→ $595 ($Ошибка выражения: неопознанный символ пунктуации «[» in 2024) (Misleading time reference)Ашаблон:!mxt
→ $100 ($Ошибка выражения: неопознанный символ пунктуации «[» adjusted for inflation) (Misleading time reference)$595 ({{Inflation|US|595|1982|fmt=eq}})
→ $595 (Ошибка выражения: неопознанный символ пунктуации «[»)$595 (equivalent to ${{Inflation|US|595|1982|fmt=c}} in {{Inflation/year|US}})
→ $595 (equivalent to $Ошибка выражения: неопознанный символ пунктуации «[» in 2021)Ашаблон:!mxt
→ Jane Doe amassed a fortune of $1 billion in 1975, making her worth $Ошибка выражения: неопознанный символ пунктуации «[» billion in 2021. (CPI is not for personal wealth of the wealthy – use GDP deflator instead)Ашаблон:!mxt
→ Jane Doe amassed a fortune of $1 billion in 1975, equivalent to $Ошибка выражения: неопознанный символ пунктуации «[» billion in 2021. (CPI is not for personal wealth of the wealthy – use GDP deflator instead)Jane Doe amassed a fortune of $1 billion in 1975, equivalent to ${{Inflation|US-GDP|1|1975|fmt=c}} billion in {{Inflation/year|US-GDP}}.
→ Jane Doe amassed a fortune of $1 billion in 1975, equivalent to $Ошибка выражения: неопознанный символ пунктуации «[» billion in 2021Entering invalid parameters or omitting required parameters will result in an error message and categorization into Category:Pages with errors in inflation template.
Ашаблон:!mxt
→ Inflation}}: Ашаблон:Separated entries must be specified.Ашаблон:!mxt
→ Inflation}}: Ашаблон:Separated entries must be specified.Ашаблон:!mxt
→ Inflation}}: Ашаблон:Separated entries must be specified.Ашаблон:!mxt
→ Inflation}}: Ашаблон:Separated entries must be specified.Ашаблон:!mxt
→ Ошибка выражения: неопознанный символ пунктуации «[»Ашаблон:!mxt
→ Ошибка выражения: неопознанный символ пунктуации «[»Ашаблон:!mxt
→ Ошибка выражения: неопознанный символ пунктуации «[»Ашаблон:!mxt
→ Ошибка выражения: неопознанный символ пунктуации «[»Ашаблон:!mxt
→ Ошибка выражения: неопознанный символ пунктуации «[» (see the Limitations section below)Ашаблон:!mxt
→ Ошибка выражения: неопознанный символ пунктуации «[»Ашаблон:!mxt
→ Ошибка выражения: неопознанный символ пунктуации «[»Ашаблон:!mxt
→ Ошибка выражения: неопознанный символ пунктуации «[»Ашаблон:!mxt
→ Ошибка выражения: неопознанный символ пунктуации «[»Many datasets are currency agnostic, which means they don't convert between different currencies. Thus, if you wanted to know today's equivalent value of 1,000.00 Austrian schillings in 1960, entering {{Inflation|AT|1000|1960|r=2}}
would provide a result (Ашаблон:Xtn) still in schillings, not in euros.
Consequently, if you need a result in a currency other than the one in which the original value is stated, for now you must do the conversion manually, as in the following example which uses the defined conversion rate of 13.7603 schillings to one Euro:
{{#expr:({{Inflation|AT|1000|1960|r=2}} / 13.7603) round 2}}
→ Ошибка выражения: неожидаемый оператор <Some datasets are not currency agnostic; check the sources for each dataset to determine this.
Ашаблон:ToDo A currency conversion template to ease these conversion tasks is planned. This section will be updated accordingly once it's developed.
The template does not accept non-decimal inputs such as £sd; these must be decimalized beforehand. For example, if you wanted to know the value of three shillings and sixpence (3s 6d) Sterling in 1950 in 2018, you must convert to the appropriate decimal value (in this case £0.175) for use in the template:
{{Inflation|GBP|0.175|1950|2018}}
→ Ошибка выражения: неопознанный символ пунктуации «[»For £sd specifically {{Pounds, shillings, and pence}} can be used to convert to decimal. For other non-decimal currencies, such as the old Indian rupee, templates can be made for decimalization upon request.
{{Inflation|GBP|{{Pounds, shillings, and pence|s=3|d=6}}|1950|2018|r=0|fmt=eq|cursign=£}}
→ Ошибка выражения: неопознанный символ пунктуации «[»{{Inflation|UK|{{Pounds, shillings, and pence|s=10|d=6}}|1865|fmt=eq|cursign=£}}
→ Ошибка выражения: неопознанный символ пунктуации «[»By default the values are calculated to the unit, as for all but very low values cents are undesirable. You can specify rounding with the |r=
parameter which determines the number of decimals. To obtain cents use |r=2
, but other values can be used, including negative ones: |r=-3
, for example, will round to the nearest thousand, |r=-6
to the nearest million, and so on. It is advisable to avoid false precision; even if the start value is known to be exact, the template's result will not be because the inflation index tables are rarely accurate to more than about 1%, and a granularity of whole years is used.
Very large results are expressed in scientific notation ("1.2E+14" instead of "120000000000000") which is normally not desirable. A workaround is to express the value to be inflated with fewer digits, adding a multiplier text such as "trillion" after the result, using the "Show preview" button as many times as needed, changing parameters until the best result is found:
${{Inflation|US-GDP|1000000000000|1900|r=-11|fmt=c}}
→ $Ошибка выражения: неопознанный символ пунктуации «[»Ашаблон:!mxt
→ $Ошибка выражения: неопознанный символ пунктуации «[»Ашаблон:!mxt
→ $Ошибка выражения: неопознанный символ пунктуации «[» thousand${{Inflation|US-GDP|10000000|1900|r=-6|fmt=c}} million
→ $Ошибка выражения: неопознанный символ пунктуации «[» million${{Inflation|US-GDP|10000|1900|r=-3|fmt=c}} billion
→ $Ошибка выражения: неопознанный символ пунктуации «[» billion${{Inflation|US-GDP|10|1900|fmt=c}} trillion
→ $Ошибка выражения: неопознанный символ пунктуации «[» trillionThe following section provides an automated way of avoiding this trial and error scenario.
{{Format price}}
is a template specifically designed to display price values, both big and small, in a readable way. For example, instead of showing the whole of a huge number such as "953,783,409,856.12", it would show it as "Ашаблон:Format price", while small numbers have their cents part appearing as expected, "1234.5" being properly shown as "Ашаблон:Format price".
${{Format price|{{Inflation|US-GDP|10000000000000|1900}}}}
→ $Ашаблон:Format price${{Format price|{{Inflation|US-GDP|1000000|1990}}}}
→ $Ашаблон:Format priceDM {{Format price|{{Inflation|DE|1000000|1957|1978}}}}
→ DM Ашаблон:Format price£{{Format price|{{Inflation|UK-GDP|1000|1323}}}}
→ £Ашаблон:Format priceIt's a good practice to provide a valid reference for the prices calculated with this template in articles where it's used. The template {{Inflation/fn}} was developed to ease this task. It accepts as its single parameter the same country codes used here, and will generate one or more appropriate footnotes. Typically, this is how a piece of text using it looks like:
In 1985 a unit cost on average $1,040. This is {{Inflation|US|1040|1985|fmt=eq}}.{{Inflation/fn|US}}
Resulting in this converted code (notice the footnote link at the end):
The footnote thus generated appears whenever {{reflist}}
or
is used in an article, usually in its "References" section. See below for the live example in this document's own References section, or click the above generated footnote to jump to it.
{{subst:Inflation|...}}
would only result in a long sequence of embedded parser code without any direct benefit. If you need to obtain an inflated price only once, please use the special ExpandTemplates page then copy the result and paste it at the desired location.An inflation series represents templates in the following categories:
Modifications need to be made to:
Current subpages: Ашаблон:List subpages
Документация TemplateData для шаблона: Inflation
Note that this template defaults to calculating the inflation of Consumer Price Index values: staples, workers' rent, small service bills (doctor's costs, train tickets). For inflating capital expenses, government expenses, or the personal wealth and expenditure of the rich, the US-GDP or UK-GDP indexes should be used, which calculate inflation based on the [[gross domestic product]] (GDP) for the [[United States]] and [[United Kingdom]], respectively.
Параметр | Описание | Тип | Статус | |
---|---|---|---|---|
Index | index 1 | An index code for one of several available inflation indexes. One of AU, AU-road, BD, CA, DE, IN, JP, PH, PK, UK, UK-GDP, US, US-GDP, ZAR, and various others.
| Строковый (без форматирования) | обязательный |
Value | value 2 | Original price or value from which to base the inflation calculation on. Will ignore any commas.
| Число | обязательный |
Start year | start_year 3 | Original year from which to base the inflation calculation on. Must be a year available in the chosen inflation index. As an exception to this, if the current year is specified and no 'End year' is specified, the template will output value unchanged, as it can be assumed an inflation of zero.
| Число | обязательный |
End year | end_year 4 | Reference year for which to calculate inflation. Must be higher (later) than 'Start year', but not higher than the highest (most recent) year available in the chosen inflation index, and will default to the highest (most recent) available year if omitted.
| Число | необязательный |
Number of digits | r | Sets the digits to which the value must be rounded. A negative value indicates rounding to an upper significant digit, and a positive value indicates a fractional digit including trailing zeros. Defaults to 0.
| Число | необязательный |
Format | fmt | "c" will insert thousands separator commas into the calculated value. "eq" will show an equivalent-to phrase, in the format, "equivalent to (cursign)(end_value) in (end_year)". Uses thousands separator commas.
| Строковый (без форматирования) | необязательный |
Currency sign | cursign | Sets the currency symbol to be shown. Only functions when Format "eq" is used. Can use advanced symbol formats, but can only precede the calculated value. Default is $.
| Строковый (без форматирования) | необязательный |
Ашаблон:Math templates