Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Usage  



1.1  Optional parameters  







2 Basic examples  





3 Table display  





4 See also  














Template:Percent and number






 / Bân-lâm-gú
Bosanski
فارسی
ि
Ilokano
Македонски

Bahasa Melayu

ି

Scots
Tagalog


Tiếng Vit
 

Edit links
 









Template
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 


Usage

[edit]

Optional parameters

[edit]

For two-column table output, use |disp=table

To insert a line break before the parenthetical expression, use |disp=br()

To add a prefix to the numbers, use |prefix=; for example, prefix=$

To add a suffix to the number, use |suffix=; for example, suffix= units

To pad the result with zeros to achieve the desired precision, use |pad=yes.

To override the default right alignment in table mode, use |align=leftor|align=center.

Basic examples

[edit]

{{percent and number|3333|20000}}17% (3,333)

{{percent and number|3333|20000|3}}16.665% (3,333)

{{percent and number|3,333|20,000}}17% (3,333)

{{percent and number|3,333|20,000|3}}16.665% (3,333)

{{percent and number|111|1000|4|pad=yes}}11.1000% (111)

{{percent and number|3333|20000|disp=br()}}17%
(3,333)

Table display

[edit]
{| class="wikitable sortable"
|-
! Location !! Percentage !! Population 
|-
| City A || {{percent and number|5000|12000|disp=table}}
|-
| City B || {{percent and number|6500|12000|disp=table}}
|-
| City C || {{percent and number|500|12000|disp=table}}
|}
Location Percentage Population
City A 42% 5,000
City B 54% 6,500
City C 4% 500

See also

[edit]

Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Percent_and_number&oldid=719813813"

Category: 
Mathematical function templates
 



This page was last edited on 11 May 2016, at 23:05 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki