A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://en.wikipedia.org/wiki/Template:Percentage below:

Template:Percentage - Wikipedia

From Wikipedia, the free encyclopedia

Usage

{{percentage|numerator|denominator|decimals to round to (zero or greater)}}

Limitations

Figures smaller than 0.0001% are shown in scientific notation.

Examples

Negative values can be used:

Normal operation is to cut off all decimal zeroes from right in rounding:

Add |pad=yes to always get as many decimals as specified, padding with zeroes where needed:

Third parameter can also be given through |pad=N:

Default denominator is 100:

Default precision is zero:

Override the percent symbol

Use a prescribed number of significant figures

Use a prescribed number of significant figures with small percentages

Use a prescribed number of significant figures with small percentages without scientific notation

Use a prescribed number of significant figures with large percentages

Use a prescribed number of significant figures with large percentages without scientific notation

Dividing by zero will result in "nan" (undefined)

TemplateData

Calculates and displays a percentage value.

Template parameters[Edit template data]

Parameter Description Type Status Numerator 1

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.

Number required Denominator 2

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.

Default
100
Number suggested Decimals 3

Number of decimals to round to (zero or greater); if pad is not Yes, 0-digits will be cropped from the end.

Default
0
Number optional Pad / actual number of digits pad

If yes, use all digits given in Decimals. If a number, pad to that number of decimals.

String optional Significant figures sigfig

If set to a positive integer, the precision of the returned number will be adjusted to match the requested number of significant figures.

Number optional % replacement %

Replacement for % symbol

Example
 percent
String optional

See also


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.3