Percent sign
The percent sign is the symbol used to indicate a percentage, a number or ratio as a fraction of 100. Related signs include the permille sign and the permyriad sign , which indicate that a number is divided by one thousand or ten thousand, respectively. Higher proportions use parts-per notation.
Correct style
Form and spacing
English style guides prescribe writing the percent sign following the number without any space between. However, the International System of Units and ISO 31-0 standard prescribe a space between the number and percent sign, in line with the general practice of using a non-breaking space between a numerical value and its corresponding unit of measurement.Other languages have other rules for spacing in front of the percent sign:
- In Czech and in Slovak, the percent sign is spaced with a non-breaking space if the number is used as a noun. In Czech, no space is inserted if the number is used as an adjective, whereas Slovak uses a non-breaking space in this case as well.
- In Croatian, the percent sign is spaced with a non-breaking space.
- In Finnish, the percent sign is always spaced, and a case suffix can be attached to it using the colon.
- In French, the percent sign must be spaced with a non-breaking space.
- According to the Real Academia Española, in Spanish, the percent sign should be spaced now, despite the fact that it is not the linguistic norm. Despite that, in North American Spanish, several style guides and institutions either recommend the percent sign be written following the number without any space between or do so in their own publications in accordance with common usage in that region.
- In Russian, the percent sign is rarely spaced, contrary to the guidelines of the GOST 8.417-2002 state standard.
- According to the Swedish Language Council, the percent sign should be preceded by a space in Swedish, as all other units.
- In German, the space is prescribed by the regulatory body in the national standard DIN 5008.
- In Turkish and some other Turkic languages, the percent sign precedes rather than follows the number, without an intervening space.
- In Persian texts, the percent sign may either precede or follow the number, in either case without a space.
- In Arabic, the percent sign follows the number; as Arabic is written from right to left, this means that the percent sign is to the left of the number, usually without a space.
- In Hebrew, the percent sign is written to the right of the number, just as in English, without an intervening space. This is because numbers in Hebrew are written from left to right, as in English.
- In Dutch, the official rule is to place a space between the number and the sign, but most of the time, the space is missing.
Usage in text
Evolution
Prior to 1425, there is no known evidence of a special symbol being used for percentages. The Italian term per cento, "for a hundred", was used as well as several different abbreviations. Examples of this can be seen in the 1339 arithmetic text depicted below. The letter p with its descender crossed by a horizontal or diagonal stroke conventionally stood for per, por, par, or pur in Medieval and Renaissance palaeography.At some point, a scribe used the abbreviation pc with a tiny loop or circle. This appears in some additional pages of a 1425 text which were probably added around 1435.
The pc with a loop eventually evolved into a horizontal fraction sign by 1650 and thereafter lost the per.
In 1925, D. E. Smith wrote, "The solidus form is modern."
Encodings
Unicode
The Unicode code points are:- ,
- , which has the circles replaced by square dots set on edge, the shape of the digit 0 in Eastern Arabic numerals.
- , パーセント in one square character.
ASCII
Other uses
In computers
Names for the percent sign include percent sign, mod, grapes, and the humorous double-oh-seven.In computing, the percent character is also used for the modulo operation in programming languages that derive their syntax from the C programming language, which in turn acquired this usage from the earlier B.
In the textual representation of URIs, a % immediately followed by a 2-digit hexadecimal number denotes an octet specifying a character that might otherwise not be allowed in URIs.
In SQL, the percent sign is a wildcard character in "LIKE" expressions, for example will fetch all records whose names start with "".
In TeX and PostScript, and in GNU Octave and MATLAB, a % denotes a line comment.
In BASIC, Visual Basic, ASP, and VBA a trailing % after a variable name marks it as an integer.
In ASP, the percent sign can be used to indicate the start and end of the ASP code
In Perl % is the sigil for hashes.
In many programming languages' string formatting operations, the percent sign denotes parts of the template string that will be replaced with arguments. In Python and Ruby the percent sign is also used as the string formatting operator.
In the command processors COMMAND.COM and CMD.EXE,,... stand for the first, second,... parameters of a batch file. %0 stands for the specification of the batch file itself as typed on the command line. The % sign is also used similarly in the FOR command.
%VAR1% represents the value of an environment variable named VAR1. Thus:
sets a new value for PATH, that being the old value preceded by "
c:\;".Because these uses give the percent sign special meaning, the sequence %% is used to represent a literal percent sign, so that:
would set PATH to the literal value "
c:\;%PATH%".In the C Shell and Z shell, % is part of the default command prompt.