How to Write Percent in LaTeX
In LaTeX % starts a comment, so everything after it on the line disappears. To print a percent sign, escape it with a backslash: 50\% gives 50%. The same \% works in text and in math mode.
Percent commands
\%Percent sign, in text and math mode.
50\%A percentage, no space (common US style).
50\,\%With a thin space, as SI and ISO style recommend.
- Text mode, no math preview
\qty{50}{\percent}siunitx: number and percent with consistent spacing.
- Text mode, no math preview
\textperthousandPer mille ‰ in text (textcomp).
Try it live
Change the formula and the preview redraws as you type. Copy the LaTeX, download a PNG or SVG, copy it for Word, or use Edit here on any example below to load it.
Percent sign examples
Each result below is drawn from the LaTeX under it. Copy the code, edit it on this page, or open it in the full editor.
Percentage in a formula
LaTeXp = \frac{k}{n} \times 100\%Growth rate
LaTeX\text{growth} = \frac{V_1 - V_0}{V_0} = 8.3\%Interest
LaTeXA = P\left(1 + \frac{5\%}{12}\right)^{12t}Confidence interval
LaTeX95\% \text{ CI} = \bar{x} \pm 1.96\,\frac{s}{\sqrt{n}}Thin space style
LaTeXx = 42\,\%
Why % makes text disappear
% is LaTeX’s comment character: the rest of the line, including the line break, is ignored. That is useful for notes in the source, but it means a 20% discount compiles to "a 20" with no error message. Search your source for % that is not preceded by a backslash when text goes missing.
Other characters with the same problem are #, $, &, _, { and }: each has a job in LaTeX and needs a backslash to print literally.
Percentages with siunitx
For documents with many numbers, siunitx keeps percent formatting consistent: \qty{12.5}{\percent} prints the number and sign with the spacing you configure once, and \num groups long numbers. The space between number and sign is set once in \sisetup, so switching a whole document between "12.5 %" and "12.5%" style is a one-line change.
\usepackage{siunitx}
...
The error rate fell to \qty{12.5}{\percent}.Common mistakes
Unescaped % comments out the rest of the line, so "discount" never appears.
Instead ofa 20% discountWritea 20\% discount\percentis a siunitx unit macro and only works inside\qtyor\unit.Instead of\percent % without siunitxWrite\%Inside
\textthe percent sign is still a comment character and must be escaped.Instead of\text{%}Write\text{\%}
In Overleaf, MathJax and Word
Overleaf and pdfLaTeX
\%works everywhere. The editor greys out anything after an unescaped%, which is a quick way to spot the problem. siunitx commands need\usepackage{siunitx}.MathJax and KaTeX
MathJax and KaTeX accept
\%in math. MathJax, like LaTeX, treats a bare%as a comment:50% xrenders as just 50. Escape it in web formulas too.Microsoft Word
Word needs no escaping: type % directly, in text and in equations. Copy for Word from the editor here converts
\%to a normal percent sign.
Percent sign in LaTeX: questions
- How do I type a percent sign in LaTeX?
- Write
\%. A bare%starts a comment. - Does \% work in math mode?
- Yes.
$50\%$prints 50% in math, and MathJax accepts it too. - Why is the rest of my line missing after a percentage?
- An unescaped
%turned the rest of the line into a comment. Replace it with\%. - Should there be a space before the percent sign?
- SI and ISO style put a (thin) space before %, many US style guides do not. Write
50\,\%or50\%consistently, or let siunitx decide from one setting.
Related LaTeX reference
- Degree Symbol in LaTeXThe ° sign four ways: ^\circ in math, \textdegree in text, \degree (gensymb) and siunitx for angles and °C.
- LaTeX SymbolsThe most-used math symbols in one table: relations, operators, sets, logic, arrows, Greek letters and accents, each with its command.
- Math Mode in LaTeXInline math with $…$ or \(…\), displayed math with \[…\], numbered equation environments, references and \text inside formulas.
- LaTeX equation editorSymbol panel, live preview, and PNG, SVG, MathML or Word export.
- All LaTeX reference pagesSymbols, math structures and text formatting in one list.
Have the formula as a picture?
Paste a screenshot or photo of the equation and get its LaTeX, ready to copy or open in the editor.
Convert an image to LaTeX