Dollar Sign ($): How to Type It, Why LaTeX Needs \$, and Other Currency Symbols
Date Published

The dollar sign $ is the currency symbol for the US dollar and more than twenty other dollars and pesos, typed with Shift + 4 on every US keyboard. In LaTeX, however, a bare $ does not print a dollar sign at all: it switches math mode on or off, which is why a stray one produces the famous "Missing $ inserted" error. To print the symbol in a LaTeX document, write \$ (or \textdollar), and use \pounds, \texteuro or \euro, and \textyen for the other major currencies.
This guide explains where the symbol came from, lists the currency signs you can copy with their Unicode code points, covers how to type them on Windows, Mac, phones, Google Docs, Word, and HTML, and then digs into why $ is special in LaTeX and how to fix the errors it causes.
Copy and Paste the Dollar Sign and Other Currency Symbols
- $ — dollar sign (U+0024)
- $ — fullwidth dollar sign, used in East Asian typography (U+FF04)
- 💲 — heavy dollar sign emoji (U+1F4B2)
- ¢ — cent sign (U+00A2)
- £ — pound sign (U+00A3)
- € — euro sign (U+20AC)
- ¥ — yen or yuan sign (U+00A5)
- ₹ — Indian rupee sign (U+20B9)
- ₩ — won sign (U+20A9)
- ₣ — French franc sign (U+20A3)
- ₡ — colón sign, Costa Rica and El Salvador (U+20A1)
- ₱ — peso sign, Philippines (U+20B1)
- ₿ — bitcoin sign (U+20BF)
- ¤ — generic currency sign, a placeholder when the currency is unknown (U+00A4)
The dollar sign exists as one character whether it is drawn with one vertical stroke or two; the two-stroke form, called the cifrão in Portuguese and used historically for the escudo and real, is a font variant rather than a separate code point.
Where the Dollar Sign Came From
The most widely accepted account traces $ to the handwritten abbreviation "ps" for pesos, the Spanish-American silver coin that circulated throughout the Americas in the 1700s. In business letters the p and s were written on top of each other, the loop of the p faded, and what was left was an S with a vertical stroke through it. The sign appears in the 1770s correspondence of Oliver Pollock, an Irish-born merchant in New Orleans, and the United States adopted it along with the dollar itself in 1785. Rival stories, such as a stylised U superimposed on an S or the Pillars of Hercules on Spanish coins, are popular but have less documentary support.
Today the same sign serves the US, Canadian, Australian, New Zealand, Hong Kong, Singapore, and many other dollars, several pesos, and the Brazilian real, which is why prefixes such as US$, CA$, and A$ exist. In computing it is just as busy: $ starts a variable in shell scripts, PHP, and Perl, anchors the end of a line in regular expressions, marks absolute references in spreadsheet formulas ($A$1), and, as we will see, toggles math mode in TeX.
How to Type the Dollar Sign and Other Currency Symbols
Symbol | Windows | Mac | HTML | LaTeX |
|---|---|---|---|---|
$ | Shift + 4 | Shift + 4 | | |
¢ | Alt + 0162 | Option + 4 | | |
£ | Alt + 0163 | Option + 3 | | |
€ | Alt + 0128 | Option + Shift + 2 | | |
¥ | Alt + 0165 | Option + Y | | |
₹ | Word: | Character Viewer | | |
₩ | Word: | Character Viewer | | |
₿ | Word: | Character Viewer | | dedicated package or Unicode font |
Windows: The dollar sign is Shift + 4 on US, UK, and most Latin layouts. The other Latin-1 currency symbols have four-digit Alt codes: hold Alt and type 0162 for ¢, 0163 for £, 0165 for ¥, and 0128 for €. The fullwidth $ and newer signs such as ₹ and ₿ need Word's Alt + X trick (type FF04 or 20B9, then Alt + X) or the Insert → Symbol dialog, where they are grouped under Currency Symbols.
Mac: Shift + 4 gives $, and the Option key covers the rest of the common set: Option + 4 is ¢, Option + 3 is £, Option + Y is ¥, and Option + Shift + 2 is €. Anything else comes from the Character Viewer (Control + Command + Space), which has a dedicated Currency Symbols category.
iPhone and Android: The $ key sits on the number layer of both keyboards. Long-press it and a pop-up offers ¢, £, €, ¥, ₩, and ₹ among others; which signs appear depends on your keyboard language.
Google Docs and Word: Type $ directly. For the rest, Google Docs has Insert → Special characters with a Currency category, and Word has Insert → Symbol plus the Alt + X method. Word's AutoCorrect may also change (e) to € in some locales.
Excel and Google Sheets: A dollar sign in a formula is not a currency symbol; $A$1 pins a cell reference so it does not shift when the formula is copied. To display currency, use the Accounting or Currency number formats instead of typing the sign into the cell.
Why the Dollar Sign Is Special in LaTeX
TeX gives $ a catcode of 3, "math shift." One $ enters inline math and the next one leaves it; a pair $$...$$ enters and leaves display math (in LaTeX, prefer \[...\]). This is the reason a dollar amount typed as $5 in a paragraph does not print a dollar sign: it starts a formula that TeX will try to close somewhere else, usually at the next $ or at the end of the paragraph. To print the symbol, escape it with a backslash: \$5 prints $5. \$ works in both text and math mode. The \textdollar command, once part of the textcomp package and part of the LaTeX kernel since 2020, is the same symbol in text mode, and \mathdollar is the math-mode version.
One typographic trap: in the default Computer Modern fonts with the OT1 encoding, an italic \$ prints a pound sign £. \textit{\$} or a dollar sign inside \emph{...} therefore comes out as £. Switching to the T1 font encoding with \usepackage[T1]{fontenc} fixes it, as does using \textdollar.
Decoding "Missing $ inserted"
This error means TeX hit a math-only command or character while in text mode, and inserted a $ to rescue the paragraph. The usual causes:
- A math command outside math mode, such as
\alpha,\frac{1}{2},x^2, ora_ityped in ordinary text. Wrap it in$...$. - An unescaped
$meant as currency, which opened math mode that then ran into a paragraph break. Write\$instead. - An unescaped underscore or caret, often in a file name or URL such as
my_file.txt. Writemy\_file.txt, or use\url{}from the hyperref or url package. - A math environment that was never closed, so the next
\sectionor blank line arrives inside a formula. Check for a missing\]or\end{equation}.
The line number in the error message points to where TeX gave up, which can be a few lines after the actual mistake, so look above it. Once the paragraph is in math mode, every subsequent letter is typeset in italic and spaces vanish, which is the visual signature of a dollar sign gone wrong.
Currency Commands in LaTeX
Among the other currencies, \pounds is in the kernel and produces £ in text (in math mode it gives the same symbol via \mathsterling). The textcomp set, now built into the kernel, adds \texteuro, \textyen, \textcent, \textwon, \textnaira, \textlira, and \textcurrency. The eurosym package provides \euro with a proper euro glyph in several weights, plus \EUR{12} for formatted amounts. Rupee and bitcoin signs come from small dedicated packages (tfrupee, and a few bitcoin symbol packages), or from any Unicode font under XeLaTeX or LuaLaTeX, where you can type ₹ and ₿ directly.
siunitx has no built-in currency unit, but you can declare one, which keeps thousands separators and spacing consistent across the document. The snippet below shows every approach together:
1\documentclass{article}2\usepackage[T1]{fontenc}3\usepackage{amsmath}4\usepackage{amssymb}5\usepackage{eurosym}6\usepackage{siunitx}7\DeclareSIUnit{\dollar}{\$}8\begin{document}9Prices: \$5, \textdollar 5, \pounds 10, \texteuro 20, \euro 20,10\EUR{20}, \textyen 100, \textcent 50, and \textwon 1000.1112In math: $x = \mathdollar 5$, $p = \$12.50$, and $c = \pounds 3$.1314With siunitx: \qty{1234.56}{\dollar} and \num{1000000} dollars.1516Escaped specials: my_file.txt, 100\%, and \#1.1718Italic works with T1 encoding: \textit{\$5 is five dollars}.19\end{document}
Remove the fontenc line and the final italic dollar sign silently becomes £, which is worth seeing once. \yen is also available as a math symbol from amssymb, while \textyen is the text version; \textrupee and \bitcoin are not in the snippet because they need packages that are not installed everywhere. A general introduction to math mode and the characters it reserves is at https://www.useoctree.com/learn/mathematical-expressions.
Related Symbols
Symbol | Name | Unicode | LaTeX |
|---|---|---|---|
% | percent sign | U+0025 | |
& | ampersand | U+0026 | |
# | number sign | U+0023 | |
_ | underscore | U+005F | |
{ } | curly braces | U+007B, U+007D | |
These are the other characters that LaTeX reserves and that must be escaped with a backslash in text. The ampersand has its own guide at https://www.useoctree.com/blog/ampersand-and-symbol-meaning-how-to-type.
FAQ
How do I type a dollar sign in LaTeX?
Write \$. A bare $ starts or ends math mode and does not print anything. \textdollar in text mode and \mathdollar in math mode are equivalent alternatives.
What does "Missing $ inserted" mean?
TeX found a command or character that is only allowed in math mode, such as \alpha, ^, or _, while it was in text mode, and inserted a $ to recover. Wrap the math in $...$, escape literal $, _, and ^ characters with a backslash, or find the math environment you forgot to close.
Why does my dollar sign show up as a pound sign?
Computer Modern's italic font in the default OT1 encoding puts £ in the dollar sign's slot, so \textit{\$} prints £. Add \usepackage[T1]{fontenc} to your preamble or use \textdollar.
How do I type the euro sign?
On Windows hold Alt and type 0128; on a Mac press Option + Shift + 2; on a phone long-press the $ key. In HTML use €, and in LaTeX use \texteuro from the kernel or \euro from the eurosym package.
What is the Alt code for the dollar sign?
The dollar sign is Shift + 4 on the keyboard, but Alt + 36 also produces it on Windows. The cent sign is Alt + 0162, the pound sign Alt + 0163, the yen sign Alt + 0165, and the euro sign Alt + 0128.
Writing Currency Cleanly in Your Documents
Escape the dollar sign as \$, use T1 encoding so italic amounts stay dollars, and reach for eurosym or siunitx when a document is full of prices. Octree, the AI LaTeX editor at https://www.useoctree.com, flags a stray $ before it becomes a "Missing $ inserted" error and compiles your document instantly so you can see the fix.