<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://safernicotine.wiki/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Template%3APercentage%2Fdoc</id>
	<title>Template:Percentage/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://safernicotine.wiki/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Template%3APercentage%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://safernicotine.wiki/mediawiki/index.php?title=Template:Percentage/doc&amp;action=history"/>
	<updated>2026-04-21T22:57:40Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://safernicotine.wiki/mediawiki/index.php?title=Template:Percentage/doc&amp;diff=39813&amp;oldid=prev</id>
		<title>imported&gt;Thingofme: high-use</title>
		<link rel="alternate" type="text/html" href="https://safernicotine.wiki/mediawiki/index.php?title=Template:Percentage/doc&amp;diff=39813&amp;oldid=prev"/>
		<updated>2023-01-10T02:52:27Z</updated>

		<summary type="html">&lt;p&gt;high-use&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Documentation subpage}}&lt;br /&gt;
{{high-use}}&lt;br /&gt;
{{tsh|pct|percent}}&lt;br /&gt;
{{lua|Module:Percentage}}&lt;br /&gt;
&amp;lt;!-- PLEASE ADD CATEGORIES AT THE BOTTOM OF THIS PAGE. --&amp;gt;&lt;br /&gt;
==Usage==&lt;br /&gt;
{{mono|&amp;lt;nowiki&amp;gt;{{percentage | numerator | denominator | decimals to round to (zero or greater) }}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
==Limitations==&lt;br /&gt;
Figures smaller than 0.0001% are shown in scientific notation.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;{{Percentage | 1 | 3 | 0 }}&amp;lt;/nowiki&amp;gt; yields {{Percentage | 1 | 3 | 0 }}&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;{{Percentage | 1 | 3 | 2 }}&amp;lt;/nowiki&amp;gt; yields {{Percentage | 1 | 3 | 2 }}&lt;br /&gt;
&lt;br /&gt;
Negative values can be used:&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;{{Percentage | -1 | 3 }}&amp;lt;/nowiki&amp;gt; yields {{Percentage | -1 | 3 }}&lt;br /&gt;
&lt;br /&gt;
Normal operation is to cut off all decimal zeroes from right in rounding:&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;{{Percentage | 1 | 5 | 2 }}&amp;lt;/nowiki&amp;gt; yields {{Percentage | 1 | 5 | 2 }}&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;{{Percentage | 1111 | 10000 | 4 }}&amp;lt;/nowiki&amp;gt; yields {{Percentage | 1111 | 10000 | 4 }}&lt;br /&gt;
Add &amp;#039;&amp;#039;&amp;#039;{{mono|&amp;lt;nowiki&amp;gt;|pad=yes&amp;lt;/nowiki&amp;gt;}}&amp;#039;&amp;#039;&amp;#039; to always get as many decimals as specified, padding with zeroes where needed:&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;{{Percentage | 1 | 5 | 2 | pad=yes }}&amp;lt;/nowiki&amp;gt; yields {{Percentage | 1 | 5 | 2 | pad=yes }}&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;{{Percentage | 1111 | 10000 | 4 | pad=yes }}&amp;lt;/nowiki&amp;gt; yields {{Percentage | 1111 | 10000 | 4 | pad=yes }}&lt;br /&gt;
Third parameter can also be given through {{mono|&amp;lt;nowiki&amp;gt;|pad=N&amp;lt;/nowiki&amp;gt;}}:&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;{{Percentage | 111 | 1000 | pad=4 }}&amp;lt;/nowiki&amp;gt; is same as &amp;lt;nowiki&amp;gt;{{Percentage | 111 | 1000 | 4 | pad=yes }}&amp;lt;/nowiki&amp;gt; and yields {{Percentage | 111 | 1000 | pad=4 }}&lt;br /&gt;
&lt;br /&gt;
Default denominator is 100:&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;{{Percentage | 20 }}&amp;lt;/nowiki&amp;gt; yields {{Percentage | 20 }}&lt;br /&gt;
&lt;br /&gt;
Default precision is zero:&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;{{Percentage | 1 | 3 }}&amp;lt;/nowiki&amp;gt; yields {{Percentage | 1 | 3 }}&lt;br /&gt;
&lt;br /&gt;
Override the percent symbol&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;{{Percentage | 1 | 3 | % = &amp;amp;amp;nbsp;percent}}&amp;lt;/nowiki&amp;gt; yields {{Percentage | 1 | 3 | % = &amp;amp;nbsp;percent}}&lt;br /&gt;
&lt;br /&gt;
Use a prescribed number of significant figures&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;{{Percentage | 1 | 4000 | sigfig = 3}}&amp;lt;/nowiki&amp;gt; yields {{Percentage | 1 | 4000 | sigfig = 3}}&lt;br /&gt;
&lt;br /&gt;
Use a prescribed number of significant figures with small percentages&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;{{Percentage | 1 | 40000000 | sigfig = 3}}&amp;lt;/nowiki&amp;gt; yields {{Percentage | 1 | 40000000 | sigfig = 3}}&lt;br /&gt;
&lt;br /&gt;
Use a prescribed number of significant figures with small percentages without scientific notation&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;{{Percentage | 1 | 40000000 | sigfig = 3 | nonscinote = y}}&amp;lt;/nowiki&amp;gt; yields {{Percentage | 1 | 40000000 | sigfig = 3 | nonscinote = y }}&lt;br /&gt;
&lt;br /&gt;
Use a prescribed number of significant figures with large percentages&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;{{Percentage | 40000000 | 2 | sigfig = 3}}&amp;lt;/nowiki&amp;gt; yields {{Percentage | 40000000 | 2 | sigfig = 3}}&lt;br /&gt;
&lt;br /&gt;
Use a prescribed number of significant figures with large percentages without scientific notation&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;{{Percentage | 40000000 | 2 | sigfig = 3 | nonscinote = y}}&amp;lt;/nowiki&amp;gt; yields {{Percentage | 40000000 | 2 | sigfig = 3 | nonscinote = y }}&lt;br /&gt;
&lt;br /&gt;
Dividing by zero will result in &amp;quot;nan&amp;quot; ([[division by zero|undefined]])&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;{{Percentage | 0 | 0 | 0 }}&amp;lt;/nowiki&amp;gt; yields {{Percentage | 0 | 0 | 0 }}&lt;br /&gt;
&lt;br /&gt;
==TemplateData==&lt;br /&gt;
{{TemplateData header}}&lt;br /&gt;
&amp;lt;templatedata&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;params&amp;quot;: {&lt;br /&gt;
		&amp;quot;1&amp;quot;: {&lt;br /&gt;
			&amp;quot;label&amp;quot;: &amp;quot;Numerator&amp;quot;,&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;The Numerator of the calculated value. The percentage will be calculated as Numerator divided by Denominator. Use of comma as a thousands separator is optional.&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;number&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;2&amp;quot;: {&lt;br /&gt;
			&amp;quot;label&amp;quot;: &amp;quot;Denominator&amp;quot;,&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;The Denominator of the calculated value. The percentage will be calculated as Numerator divided by Denominator.  Use of comma as a thousands separator is optional. Can be left out, in which case 100 will be used as the Denominator, and the Numerator will be the direct percentage used.&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;number&amp;quot;,&lt;br /&gt;
			&amp;quot;suggested&amp;quot;: true,&lt;br /&gt;
			&amp;quot;default&amp;quot;: &amp;quot;100&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;3&amp;quot;: {&lt;br /&gt;
			&amp;quot;label&amp;quot;: &amp;quot;Decimals&amp;quot;,&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Number of decimals to round to (zero or greater); if pad is not Yes, 0-digits will be cropped from the end.&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;number&amp;quot;,&lt;br /&gt;
			&amp;quot;default&amp;quot;: &amp;quot;0&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;pad&amp;quot;: {&lt;br /&gt;
			&amp;quot;label&amp;quot;: &amp;quot;Pad / actual number of digits&amp;quot;,&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;If yes, use all digits given in Decimals. If a number, pad to that number of decimals.&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;sigfig&amp;quot;: {&lt;br /&gt;
			&amp;quot;label&amp;quot;: &amp;quot;Significant figures&amp;quot;,&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;If set to a positive integer, the precision of the returned number will be adjusted to match the requested number of significant figures.&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;number&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;%&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Replacement for % symbol&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;&amp;amp;nbsp;percent&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,&lt;br /&gt;
			&amp;quot;label&amp;quot;: &amp;quot;% replacement&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	},&lt;br /&gt;
	&amp;quot;description&amp;quot;: &amp;quot;Calculates and displays a percentage value.&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/templatedata&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* {{tl|Number and percent}}&lt;br /&gt;
* {{tl|Winning percentage}}&lt;br /&gt;
* {{tl|Round}}&lt;br /&gt;
* {{tl|Significant figures}}&lt;br /&gt;
* {{tl|Fractions and ratios}}&lt;br /&gt;
&amp;lt;includeonly&amp;gt;&amp;lt;!--&lt;br /&gt;
++++ PLEASE ADD CATEGORIES BELOW THIS LINE, THANK YOU. --&amp;gt;{{basepage subpage|&lt;br /&gt;
[[Category:Mathematical function templates|Percentage]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>imported&gt;Thingofme</name></author>
	</entry>
</feed>