Template talk:Inflation

(Redirected from Template talk:Inflation-year)
Latest comment: 1 day ago by Zackmann08 in topic Template-protected edit request on 16 June 2026

Padding with trailing zero?

edit

{{Inflation|index=US|value=0.50|start_year=1908|r=2|fmt=eq}}

produces "equivalent to $17.5 in 2024". How do I convince it to include the trailing zero for the cents, i.e. "equivalent to $17.50 in 2024"? RoySmith (talk) 11:58, 29 October 2025 (UTC)Reply

I'm still seeing this on Ten-Cent Beer Night, which includes r=2, but which displays "$0.4" instead of "$0.40" as the adjusted price. White 720 (talk) 18:40, 6 May 2026 (UTC)Reply

Mexico

edit

Why does Mexico end in 2007 and not continue to 2024 like some other major countries? Iljhgtn (talk) 03:32, 1 December 2025 (UTC)Reply

Edit request 23 January 2026

edit

Request: change | JP = 2019 to | jp = 2024 on Template:Inflation/year. The Account 2 (talk) 10:15, 23 January 2026 (UTC)Reply

 Done * Pppery * it has begun... 00:12, 28 January 2026 (UTC)Reply

Edit request 23 January 2026

edit

Request: change | CN = 2023 to | CN = 2024 on Template:Inflation/year. The Account 2 (talk) 10:26, 23 January 2026 (UTC)Reply

 Done * Pppery * it has begun... 00:12, 28 January 2026 (UTC)Reply

Extract dataset?

edit

Is it possible to extract the multipliers this template uses? I've got a range of figures for financial years ending 30 June 1910 to 30 June 1954 in a spreadsheet and I'd like to use the multipliers from this template (subset index = AU) to convert them all to $AUD-1954.

Anothersignalman (talk) 19:56, 5 February 2026 (UTC)Reply

The dataset pages are linked from the documentation page. Have you looked at the source code for Template:Inflation/AU/dataset, for example? – Jonesey95 (talk) 13:15, 6 February 2026 (UTC)Reply
Ah I see, I was looking at the source code for the main page not the subset. Thanks, I can work with those numbers :) Anothersignalman (talk) 13:30, 6 February 2026 (UTC)Reply

Edit request 14 February 2026

edit

Description of suggested change: Please add new citation for Canada's data; I have updated the Inflation template with data through 2025.


Diff:

| CA = {{#tag:ref|'''1688 to 1923''': Geloso, Vincent, ''[http://dx.doi.org/10.2139/ssrn.2881432 A Price Index for Canada, 1688 to 1850]'' (December 6, 2016). Afterwards, Canadian inflation numbers based on [[Statistics Canada]] tables 18-10-0005-01 (formerly CANSIM 326-0021) {{cite web |publisher=Statistics Canada |url=https://www150.statcan.gc.ca/t1/tbl1/en/cv.action?pid=1810000501#timeframe |title=Consumer Price Index, annual average, not seasonally adjusted |access-date=April 17, 2021}} and table 18-10-0004-13 {{cite web |website=Statistics Canada |url=https://www150.statcan.gc.ca/t1/tbl1/en/cv.action?pid=1810000413#timeframe |title=Consumer Price Index by product group, monthly, percentage change, not seasonally adjusted, Canada, provinces, Whitehorse, Yellowknife and Iqaluit |access-date=April 17, 2021}} |name = "inflation-CA" |group={{{group|}}}}}
+
| CA = {{#tag:ref|'''1688 to 1923''': Geloso, Vincent, ''[http://dx.doi.org/10.2139/ssrn.2881432 A Price Index for Canada, 1688 to 1850]'' (December 6, 2016). Afterwards, Canadian inflation numbers based on [[Statistics Canada]] tables 18-10-0005-01 (formerly CANSIM 326-0021) {{cite web |publisher=Statistics Canada |url=https://www150.statcan.gc.ca/t1/tbl1/en/cv.action?pid=1810000501#timeframe |title=Consumer Price Index, annual average, not seasonally adjusted |access-date=April 17, 2021}}, table 18-10-0004-13 {{cite web |website=Statistics Canada |url=https://www150.statcan.gc.ca/t1/tbl1/en/cv.action?pid=1810000413#timeframe |title=Consumer Price Index by product group, monthly, percentage change, not seasonally adjusted, Canada, provinces, Whitehorse, Yellowknife and Iqaluit |access-date=April 17, 2021}} and table 18-10-0005-01 {{cite web |website=Statistics Canada |urlhttps://www150.statcan.gc.ca/t1/tbl1/en/tv.action?pid=1810000501 |title=Consumer Price Index, annual average, not seasonally adjusted |access-date=February 14, 2026}} |name = "inflation-CA" |group={{{group|}}}}}

Em-as-in-emily (talk) 19:19, 14 February 2026 (UTC)Reply

 Completed. P.I. Ellsworth, ed.  welcome!  04:41, 15 February 2026 (UTC)Reply

Edit request 14 February 2026

edit

Description of suggested change: Please update Canada's year; I have already updated the dataset with data through 2025.


Diff:

| CA = 2023
+
| CA = 2025

Em-as-in-emily (talk) 19:37, 14 February 2026 (UTC)Reply

 Completed. P.I. Ellsworth, ed.  welcome!  04:46, 15 February 2026 (UTC)Reply

I would like to request some more example currency signs in the TemplateData section

edit

In the section called "TemplateData" where it shows currently an "example" of currency sign, it would be nice to have many "examples" there instead, so that I could easily copy from the one that is needed and paste that in. Instead I need to go google the currency sign, copy it, come back to the inflation template additional edit that I am working on, and only then am I able to hit publish. This is clunky and could be aided by just having most of the most common currency signs, Japanese Yen, Euro, USD, Pound Sterling, and maybe any others that someone can think of. Iljhgtn (they/them · talk) 02:45, 15 February 2026 (UTC)Reply

To editor Iljhgtn:  completed. P.I. Ellsworth, ed.  welcome!  05:11, 15 February 2026 (UTC)Reply

Edit request 15 February 2026

edit

Description of suggested change: My apologies! Due to a copypaste error on my part there's an "=" missing in the template. Please add it to fix the citation.


Diff:

| CA = {{#tag:ref|'''1688 to 1923''': Geloso, Vincent, ''[http://dx.doi.org/10.2139/ssrn.2881432 A Price Index for Canada, 1688 to 1850]'' (December 6, 2016). Afterwards, Canadian inflation numbers based on [[Statistics Canada]] tables 18-10-0005-01 (formerly CANSIM 326-0021) {{cite web |publisher=Statistics Canada |url=https://www150.statcan.gc.ca/t1/tbl1/en/cv.action?pid=1810000501#timeframe |title=Consumer Price Index, annual average, not seasonally adjusted |access-date=April 17, 2021}}, table 18-10-0004-13 {{cite web |website=Statistics Canada |url=https://www150.statcan.gc.ca/t1/tbl1/en/cv.action?pid=1810000413#timeframe |title=Consumer Price Index by product group, monthly, percentage change, not seasonally adjusted, Canada, provinces, Whitehorse, Yellowknife and Iqaluit |access-date=April 17, 2021}} and table 18-10-0005-01 {{cite web |website=Statistics Canada |urlhttps://www150.statcan.gc.ca/t1/tbl1/en/tv.action?pid=1810000501 |title=Consumer Price Index, annual average, not seasonally adjusted |access-date=February 14, 2026}} |name = "inflation-CA" |group={{{group|}}}}}
+
| CA = {{#tag:ref|'''1688 to 1923''': Geloso, Vincent, ''[http://dx.doi.org/10.2139/ssrn.2881432 A Price Index for Canada, 1688 to 1850]'' (December 6, 2016). Afterwards, Canadian inflation numbers based on [[Statistics Canada]] tables 18-10-0005-01 (formerly CANSIM 326-0021) {{cite web |publisher=Statistics Canada |url=https://www150.statcan.gc.ca/t1/tbl1/en/cv.action?pid=1810000501#timeframe |title=Consumer Price Index, annual average, not seasonally adjusted |access-date=April 17, 2021}}, table 18-10-0004-13 {{cite web |website=Statistics Canada |url=https://www150.statcan.gc.ca/t1/tbl1/en/cv.action?pid=1810000413#timeframe |title=Consumer Price Index by product group, monthly, percentage change, not seasonally adjusted, Canada, provinces, Whitehorse, Yellowknife and Iqaluit |access-date=April 17, 2021}} and table 18-10-0005-01 {{cite web |website=Statistics Canada |url=https://www150.statcan.gc.ca/t1/tbl1/en/tv.action?pid=1810000501 |title=Consumer Price Index, annual average, not seasonally adjusted |access-date=February 14, 2026}} |name = "inflation-CA" |group={{{group|}}}}}

Em-as-in-emily (talk) 05:08, 15 February 2026 (UTC)Reply

 Completed. P.I. Ellsworth, ed.  welcome!  05:15, 15 February 2026 (UTC)Reply

Edit request 18 February 2026

edit

Description of suggested change: The Federal Reserve Bank of Minneapolis CPI table now includes 2025 data (967.5) and has revised its 2024 annual average from 944.9 to 942.7. Please update Template:Inflation/US/dataset to match. This fixes errors on pages such as List of disasters by cost where {{Inflation|US|...|2025|...}} currently fails.


Diff:

| 2024 = 944.9 |#default = 944.9 <!-- *** When changing this, also update the reference in [[Template:Inflation/fn]] and the latest year in [[Template:Inflation/year]]! *** -->
+
| 2024 = 942.7 | 2025 = 967.5|#default = 967.5 <!-- *** When changing this, also update the reference in [[Template:Inflation/fn]] and the latest year in [[Template:Inflation/year]]! *** -->

Brett A. Thomas (talk) 12:08, 18 February 2026 (UTC)Reply

 Completed. P.I. Ellsworth, ed.  welcome!  14:48, 18 February 2026 (UTC)Reply

Edit request 02 March 2026

edit

Description of requested change: A parameter to shorten "equivalent to" would be useful for length-constrained applications. I believe the easiest way to do this would be to add a parameter "fmt=eqs" (for "equivalent short") which can be used in place of "fmt=eq".

Ex: "$500 (equivalent to $1000 in 2025)" --> "$500 (eq. $1000 in 2025)"

DeklinCaban (talk) 16:34, 2 March 2026 (UTC)Reply

That sounds like a good way to confuse readers unnecessarily with an ambiguous abbreviation. See Wikipedia:Manual of Style/Abbreviations for guidance. – Jonesey95 (talk) 01:13, 4 March 2026 (UTC)Reply

Very small values

edit

I've run into a problem On the Australia Post article with the price of letter postage from 1911. Somewhere in the calculation this rounds to zero so we get zero rather than 64 cents. Is there a workaround?


  • 1911: 1d equivalent to A$0 in 2022
  • 1920: 2d equivalent to A$0.79 in 2022

Newystats (talk) 04:48, 6 March 2026 (UTC)Reply

The problem is in the use of the default rounding in the {{£sd}} template:
{{£sd |d=1}} 0.00
{{£sd |d=1.5}} 0.01
{{£sd |d=2}} 0.01
{{£sd |d=3}} 0.01
{{£sd |d=4}} 0.02
{{£sd |d=5}} 0.02
You need to fix the output from that template:
{{Inflation|AU|{{£sd|round=4 |d=1}}|1911|r=2}} 0.64
{{Inflation|AU|{{£sd|round=4 |d=1.5}}|1911|r=2}} 0.96
{{Inflation|AU|{{£sd|round=4 |d=2}}|1911|r=2}} 1.27
{{Inflation|AU|{{£sd|round=4 |d=3}}|1911|r=2}} 1.91
{{Inflation|AU|{{£sd|round=4 |d=4}}|1911|r=2}} 2.55
{{Inflation|AU|{{£sd|round=4 |d=5}}|1911|r=2}} 3.18
I hope that makes sense. – Jonesey95 (talk) 19:00, 7 March 2026 (UTC)Reply
Brilliant! Thanks. Newystats (talk) 22:28, 9 March 2026 (UTC)Reply

Template-protected edit request on 7 March 2026: UK inflation is incorrect (RPI, not CPI)

edit

The documentation at Template:Inflation/UK/dataset says,

This sub-template returns the associated country's CPI for a specific year.

but provides a source for RPI values,

The information in this dataset is input from "The Annual RPI and Average Earnings for Britain, 1209 to 2014 (New Series): UK Retail Price Index"

which overestimate inflation compared to CPI. For example, Template:Inflation says £100 in 2013 is "equivalent to £145 in 2023", compared to a figure of £134.19 for CPI per the Bank of England's inflation calculator. Inspecting the Bank of England's webpage, one finds a definition for window.boeInflationData – essentially a JSON table of the data we want, provided by a reliable source. Let's update Template:Inflation/UK/dataset to use these data instead. AlphaMikeOmega (talk) 15:30, 7 March 2026 (UTC)Reply

I've just used a script to convert the data into wikitext. Please use the following:
The source given at Template:Inflation/doc/cpi-uk would also need updating to https://www.bankofengland.co.uk/monetary-policy/inflation/inflation-calculator.AlphaMikeOmega (talk) 18:07, 7 March 2026 (UTC)Reply
I've published the script in question at User:AlphaMikeOmega/Scripts/generate_inflation_uk_dataset.py. AlphaMikeOmega (talk) 18:39, 7 March 2026 (UTC)Reply
The ONS provides annualised CPI data going back to 1988, including a datum for 2025. It's compatible with the Bank of England's data (using the same 2015/£100 base), but I notice the Bank of England has the wrong value for 2023 (132.2 instead of 130.5, the Bank being incorrect because it cites the ONS). We could correct this and add a 2025 value if we cite both sources. AlphaMikeOmega (talk) 19:03, 7 March 2026 (UTC)Reply
 Done @AlphaMikeOmega: Please supply code that should be added to Template:Inflation/fn as well as updating the /doc page which isn't protected. * Pppery * it has begun... 00:11, 16 March 2026 (UTC)Reply
@Pppery: Thanks! Since the data in use at the moment comes purely from the Bank of England (i.e. lacks ONS data, including the value for 2025 and a correction to the 2023 value), I expect we can use
| UK = {{#tag:ref|UK [[Consumer Price Index]] inflation figures from 1209–2024 based on data from {{cite web |author=<!-- not stated --> |date={{#if:{{{df|}}}|18 February 2026|February 18, 2026}} |title=Inflation calculator |url=https://www.bankofengland.co.uk/monetary-policy/inflation/inflation-calculator |website=[[Bank of England]] |location=London |publisher=[[Bank of England]] |access-date={{#if:{{{df|}}}|7 March 2026|March 7, 2026}} |mode={{{mode|}}} }} |name="inflation-UK" |group={{{group |}}}}}
However, this does not address the fact that the data are not in plaintext but are embedded in the HTML. I am not sure whether referencing [[[User:AlphaMikeOmega/Scripts/generate_inflation_uk_dataset.py]] as well would be proper, nor the correct way to reference the script if it is. I could modify the script to use ONS data as well, in which case both the data and the reference would need updating again, but for now, the above does at least point to the correct webpage for all the data currently in the table. AlphaMikeOmega (talk) 21:55, 17 March 2026 (UTC)Reply
Updated that line in /fn. I don't think you need a ref to the script; the calculator website provides a way for readers to verify the calculation which is sufficient. * Pppery * it has begun... 00:14, 18 March 2026 (UTC)Reply
@AlphaMikeOmega I wrote a replacement script in javascript, so that the data can be easily extracted without using software other than a web browser. I also updated it so that it can process the years that are specified on a month-by-month basis (currently that means 2025). It's on Template:Inflation/doc/cpi-uk. --Ahecht (TALK
PAGE
)
15:28, 1 April 2026 (UTC)Reply

Template-protected edit request on 13 March 2026

edit

AU entry erroneously begins "AU =" in the actual text. Please remove the second "AU =" so it matches the other entries. Mauls (talk) 21:13, 13 March 2026 (UTC)Reply

 Done * Pppery * it has begun... 00:08, 16 March 2026 (UTC)Reply

Using both CPI and GDP in one article?

edit

In Carlisle & Finch, I have some values that should used GDP, and some that should use CPI. How do people typically handle this from a citation point of view? I could put {{Inflation-fn}} after every use of {{Inflation}} to indicate which it is, but that would leave to an absurd clutter of pointless citations. Any better ideas? RoySmith (talk) 23:45, 14 March 2026 (UTC)Reply

MeasuringWorth inflation calculator

edit

Hello. The MeasuringWorth inflation calculator for GBP seems to have updated to now display equivalent prices in 2024. However, the text the template produces in footnotes still reads "equates to approximately £X in 2023". I've been advised that this is something that needs to be changed in the template itself, as opposed to something which can be fixed through source editing. Help much appreciated! Mac Edmunds (talk) 13:23, 25 March 2026 (UTC)Reply

@Mac Edmunds Fixed --Ahecht (TALK
PAGE
)
17:26, 1 April 2026 (UTC)Reply
Thanks very much. Out of interest, and to save me starting up this conversation a few years down the line, will the year displayed always now the year which the calculation is based on? i.e., if it updates to 2026 equivalents, will the text then say “equivalent to X in 2026”? Thanks. Mac Edmunds (talk) 17:38, 1 April 2026 (UTC)Reply
@Mac Edmunds Yes, as long as the article uses the |fmt=eq option rather than manually generating the "in 2026" text AND {{Inflation/year}} is kept up to date with the data set. --Ahecht (TALK
PAGE
)
15:58, 2 April 2026 (UTC)Reply

Edit request 1 April 2026.

edit

Description of suggested change:

Greetings and felicitations. In the UK version of the template "Bank of England" appears twice, as here. Please removed the first instance. Also, there are numerous hyphen-minuses being used for en dashes in date ranges that should be replaced. E.g., "Real Wages and Relative Factor Prices in the Third World 1820-1940: Latin America" —> "Real Wages and Relative Factor Prices in the Third World 1820–1940: Latin America". In fact, the references could use being converted to citation templates (I would prefer CS1), or at least brought into line with MOS:MAJORWORK and MOS:MINORWORK. In your, I have no doubt, exceedingly copious spare time. ;-)

Diff:

Example: "Real Wages and Relative Factor Prices in the Third World 1820-1940: Latin America" ORIGINAL_WIKITEXT
+
Example: "Real Wages and Relative Factor Prices in the Third World 1820–1940: Latin America" CHANGED_WIKITEXT

DocWatson42 (talk) 05:16, 1 April 2026 (UTC)Reply

@DocWatson42:  Done (at least the en dashes and redundant publisher, I'll leave the CS1 template conversion to someone else). --Ahecht (TALK
PAGE
)
14:51, 1 April 2026 (UTC)Reply
Thank you. ^_^ —DocWatson42 (talk)< DocWatson42 (talk) 15:12, 1 April 2026 (UTC)Reply

Inflation template

edit

There has been a change to the template today that has broken the template. It means we now have a large red error message on today's TFA (as of the datestamp on this message). Can someone examine and rectify asap? - SchroCat (talk) 13:45, 1 April 2026 (UTC)Reply

@SchroCat Fixed --Ahecht (TALK
PAGE
)
14:40, 1 April 2026 (UTC)Reply

Notification of template error on Benedict Arnold

edit

Hello,

There seem to be multiple errors in inflation calculation on the page for Benedict Arnold;

Example:

The British promised £20,000 (equivalent to £Error when using Error when using {{Inflation}}: |index= (parameter 1), |value= (parameter 2) and |start_year= (parameter 3) must be specified.: NaN/calculation error, please notify Template talk:Inflation. in 2025)

Thank you for your attention to this matter. Mem0ry-forest (talk) 13:47, 1 April 2026 (UTC)Reply

@Mem0ry-forest Fixed --Ahecht (TALK
PAGE
)
14:40, 1 April 2026 (UTC)Reply

Support for units, like "million"?

edit

Most of my writing is about things that cost a lot of money, to the point where the base unit is not dollars but millions or billions of them. This results in things like "... which was estimated to cost $30 billion." I try to remember to use this template wherever possible, but in cases like these the result is not satisfying, "... (130,024,024,045 in 2025)". Yes, I know I can clean that up using decimals and such, but ideally it would say "... (130 billion in 2025)". Is there a way to do that? If not, may I request it? Maury Markowitz (talk) 12:27, 19 April 2026 (UTC)Reply

While I personally don't write many articles, I have edited an article that seems to do the trick. You can take a look at its formatting.
https://en.wikipedia.org/w/index.php?title=List_of_mergers_and_acquisitions_by_Microsoft&action=edit&editingStatsId=8b0a0b014692f097ac7a&editingStatsOversample=1&gesuggestededit=1&wvprov=sticky-header DNeutral (talk) 22:05, 18 May 2026 (UTC)Reply

Template-protected edit request on 25 May 2026

edit

I need to update NZ from 2024 to 2026. Jonathanischoice (talk) 00:31, 25 May 2026 (UTC)Reply

I need to update the NZ citation, where it currently contains 2018–2024, to read 2018–2026 (or better yet, perhaps something like Since 2018 or 2018– at your discretion (which would not require any further periodic updates until the source changes) Jonathanischoice (talk) 00:36, 25 May 2026 (UTC)Reply

 Completed. The edits have been done to both /fn and to /year. And I've combined the edit requests together for clarity. In reference to your suggestion to vary the format, the source determines this and it seems all the sources go with a 2018–2026 type format. P.I. Ellsworth, ed.  welcome!  01:23, 25 May 2026 (UTC)Reply

Template-protected edit request on 16 June 2026

edit
| FR = 2022
+
| FR = 2025

EvenTwist41 (talk) 00:23, 16 June 2026 (UTC)Reply

Not done for now: Has the data for FR been updated to 2025? Can you provide a source showing this? Zackmann (Talk to me/What I been doing) 01:37, 16 June 2026 (UTC)Reply
I updated it in Special:Diff/1359566136 based on https://www.insee.fr/en/statistiques/serie/010605954 which is the same source that was used until 2022. EvenTwist41 (talk) 02:25, 16 June 2026 (UTC)Reply
 Done @EvenTwist41: perfect! Next time you request an edit like this, if you can include that type of information in the initial request that will expedite things. Just gotta do my double checking before implementing your request. Thanks for providing the diff and source. That was super helpful. --Zackmann (Talk to me/What I been doing) 02:35, 16 June 2026 (UTC)Reply