J u m p t o c o n t e n t
M a i n m e n u
M a i n m e n u
N a v i g a t i o n
● M a i n p a g e
● C o n t e n t s
● C u r r e n t e v e n t s
● R a n d o m a r t i c l e
● A b o u t W i k i p e d i a
● C o n t a c t u s
● D o n a t e
C o n t r i b u t e
● H e l p
● L e a r n t o e d i t
● C o m m u n i t y p o r t a l
● R e c e n t c h a n g e s
● U p l o a d f i l e
S e a r c h
Search
A p p e a r a n c e
● C r e a t e a c c o u n t
● L o g i n
P e r s o n a l t o o l s
● C r e a t e a c c o u n t
● L o g i n
P a g e s f o r l o g g e d o u t e d i t o r s l e a r n m o r e
● C o n t r i b u t i o n s
● T a l k
( T o p )
1
U s a g e
T o g g l e U s a g e s u b s e c t i o n
1 . 1
O p t i o n a l p a r a m e t e r s
2
B a s i c e x a m p l e s
3
T a b l e d i s p l a y
4
S e e a l s o
T o g g l e t h e t a b l e o f c o n t e n t s
T e m p l a t e : N u m b e r a n d p e r c e n t
2 0 l a n g u a g e s
● ব া ং ল া
● 閩 南 語 / B â n - l â m - g ú
● ف ا ر س ی
● Հ ա յ ե ր ե ն
● I l o k a n o
● Í s l e n s k a
● L a d i n
● म ै थ ि ल ी
● М а к е д о н с к и
● न े प ा ल ी
● 日 本 語
● ਪ ੰ ਜ ਾ ਬ ੀ
● R o m â n ă
● S i m p l e E n g l i s h
● త ె ల ు గ ు
● ไ ท ย
● T ü r k ç e
● ا ر د و
● T i ế n g V i ệ t
● 中 文
E d i t l i n k s
● T e m p l a t e
● T a l k
E n g l i s h
● R e a d
● E d i t
● V i e w h i s t o r y
T o o l s
T o o l s
A c t i o n s
● R e a d
● E d i t
● V i e w h i s t o r y
G e n e r a l
● W h a t l i n k s h e r e
● R e l a t e d c h a n g e s
● U p l o a d f i l e
● S p e c i a l p a g e s
● P e r m a n e n t l i n k
● P a g e i n f o r m a t i o n
● G e t s h o r t e n e d U R L
● D o w n l o a d Q R c o d e
● W i k i d a t a i t e m
P r i n t / e x p o r t
● D o w n l o a d a s P D F
● P r i n t a b l e v e r s i o n
A p p e a r a n c e
F r o m W i k i p e d i a , t h e f r e e e n c y c l o p e d i a
T h i s i s t h e c u r r e n t r e v i s i o n o f t h i s p a g e , a s e d i t e d b y M a t h X p l o r e ( t a l k | c o n t r i b s ) at 0 7 : 5 0 , 5 M a y 2 0 2 4 . T h e p r e s e n t a d d r e s s ( U R L ) i s a p e r m a n e n t l i n k t o t h i s v e r s i o n .
( d i f f ) ← P r e v i o u s r e v i s i o n | L a t e s t r e v i s i o n ( d i f f ) | N e w e r r e v i s i o n → ( d i f f )
This template may be used to generate a number and a percentage of total. For the reverse, see {{ percent and number }} .
{{number and percent|number|total}}
{{number and percent|number|total|decimals to round to (zero or greater)}}
Optional parameters [ edit ]
For two-column table output, use |disp=table
To show the total with the table option, use |total=yes
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 specify a number n of significant figures for the percentage, use |sigfig=n
.
To specify a percentage suffix (e.g. per cent ) other than % , use |%=suffix
, e.g. |%=per cent
.
To override the scientific notation default for very large and very small numbers, use |nonscinote=yes
.
To override the default right alignment in table mode, use |align=left
or |align=center
.
The percent font size may be specified with |size=
, e.g. |size=small
, |size=90%
.
Basic examples [ edit ]
{{number and percent|3333|20000}}
→ 3,333 ( 17%)
{{number and percent|3333|20000|3}}
→ 3,333 ( 16.665%)
{{number and percent|3,333|20,000}}
→ 3,333 ( 17%)
{{number and percent|3,333|20,000|3}}
→ 3,333 ( 16.665%)
{{number and percent|111|1000|4|pad=yes}}
→ 111 ( 11.1000%)
{{number and percent|3333|20000|disp=br()}}
→ 3,333( 17%)
Table display [ edit ]
{| class = "wikitable sortable"
|-
! Location !! Population !! Percentage
|-
| City A || {{ number and percent | 5000| 12000| disp = table}}
|-
| City B || {{ number and percent | 6500| 12000| disp = table}}
|-
| City C || {{ number and percent | 500| 12000| disp = table}}
|}
Location
Population
Percentage
City A
5,000
42%
City B
6,500
54%
City C
500
4%
See also [ edit ]
R e t r i e v e d f r o m " https://en.wikipedia.org/w/index.php?title=Template:Number_and_percent&oldid=1222313145 "
C a t e g o r y :
● M a t h e m a t i c a l f u n c t i o n t e m p l a t e s
H i d d e n c a t e g o r y :
● P a g e s w i t h n o n - n u m e r i c f o r m a t n u m a r g u m e n t s
● T h i s p a g e w a s l a s t e d i t e d o n 5 M a y 2 0 2 4 , a t 0 7 : 5 0 ( U T C ) .
● T e x t i s a v a i l a b l e u n d e r t h e C r e a t i v e C o m m o n s A t t r i b u t i o n - S h a r e A l i k e L i c e n s e 4 . 0 ;
a d d i t i o n a l t e r m s m a y a p p l y . B y u s i n g t h i s s i t e , y o u a g r e e t o t h e T e r m s o f U s e a n d P r i v a c y P o l i c y . W i k i p e d i a ® i s a r e g i s t e r e d t r a d e m a r k o f t h e W i k i m e d i a F o u n d a t i o n , I n c . , a n o n - p r o f i t o r g a n i z a t i o n .
● P r i v a c y p o l i c y
● A b o u t W i k i p e d i a
● D i s c l a i m e r s
● C o n t a c t W i k i p e d i a
● C o d e o f C o n d u c t
● D e v e l o p e r s
● S t a t i s t i c s
● C o o k i e s t a t e m e n t
● M o b i l e v i e w