Template:UN Population/doc

{{UN_Population}} allows for the population of any country area or region to be updated from a single location. To use it on an article, enter the template {{UN_Population|Countryname}} for the population (use the UN WPP country name, which you can find in the template by opening it for editing).

You can also enter the year, the source, and cite the reference (see table). This will work in both the infobox and prose.

Data Code and sample use Result
Source {{UN_Population|source}} "World Population Prospects 2022". population.un.org. United Nations Department of Economic and Social Affairs, Population Division. Retrieved July 17, 2022.
Year {{UN_Population|Year}} 2021
Reference {{UN_Population|ref}} UN 2021
Country population The population of Thailand is
{{UN_Population|Thailand}}
The population of Thailand is
71,601,103
Country population The population of Thailand is around
{{#expr:{{formatnum:{{UN_Population|Thailand}}|R}}/1e6 round 0}} million
The population of Thailand is around
72 million
Country population The population of Thailand is around
{{#expr:{{formatnum:{{UN_Population|Thailand}}|R}}/1e6 round 1}} million
The population of Thailand is around
71.6 million
Country population The population of Thailand is more than
{{#expr:floor({{formatnum:{{UN_Population|Thailand}}|R}}/1e6)}} million
The population of Thailand is more than
71 million

The data is taken from the UN Projections of population growth at the World Population Prospects website, which is updated bi-annually. Current data is from 2021.

When updating the figures, also update the year (at the top).