The best documented explanation reveals that the sign evolved out of the Spanish and Spanish American scribal abbreviation "ps" for pesos. A study of late eighteenth- and early nineteenth-century manuscripts shows that the s gradually came to be written over the p developing a close equivalent to the "$" mark.
There are a number of other theories about the origin of the symbol, some with a measure of academic acceptance, others the symbolic equivalent of false etymologies.
Drawn with one vertical line ($)
One theory is that the dollar sign is derived from a slash through the numeral eight, denoting pieces of eight. The Oxford English Dictionary before 1963 held that this was the most probable explanation, though later editions have placed it in doubt.
Spanish pieces of eight
Image of a 1768 Spanish Colonial Real silver coin, showing the PTSI mint mark in the lower right and left quadrants and the Pillars of Hercules surrounding a picture of the world.
Another theory is that the dollar sign was derived from or inspired by the mint mark on the Spanish pieces of eight that were minted in Potosí (in present day Bolivia). The mint mark, composed of the letters "PTSI" superimposed, bears a strong resemblance to the single-stroke dollar sign (see photo). The mark, which appeared on silver coins minted from 1573 to 1825 in Potosí, the largest mint during the colonial period, would have been widely recognized throughout the North American colonies.
Alternatively, the $ symbol derives from the scroll on the pillar, on the reverse of the "pillar dollar" variety of pieces of eight.
Another theory is that the dollar sign may have also originated from Hermes, the Greek god of bankers, thieves, messengers, and tricksters. One of his symbols was the caduceus, a staff from which ribbons or snakes dangled in a sinuous curve.
A common theory holds that it derives from the Spanish coat of arms engraved on the colonial silver coins, the reals, (among them the Spanish dollar) that were in circulation in Spain's colonies in America and Asia. Reals and Spanish dollars were also legal tender in the English colonies in North America, which later became part of the United States and Canada.
In 1492, Ferdinand II of Aragon adopted the symbol of the Pillars of Hercules and added the Latin warning Non plus ultra meaning meaning "nothing further beyond", indicating "this is the end of the (known) world." But when Christopher Columbus came to America, the legend was changed to Plus ultra: meaning "further beyond."
The symbol was adopted by Charles V and was part of his coat of arms representing Spain's American possessions. The symbol was later stamped on coins minted in gold and silver. These coins, depicting the Pillars of Hercules over two hemispheres and a small "S"-shaped ribbon around each, were spread throughout America, Europe and Asia. For the sake of simplicity, traders wrote signs that, instead of saying dollar or peso, had this symbol made by hand, and this in turn evolved into a simple S with two vertical bars.
A dollar sign with two vertical lines could have started off as a monogram of 'USA', used on money bags issued by the United States Mint. The letters U and S superimposed resemble the historical double-stroke dollar sign : the bottom of the 'U' disappears into the bottom curve of the 'S', leaving two vertical lines. It is postulated from the papers of Dr. James Alton James, a professor of history at Northwestern University from 1897-1935, that the symbol with two strokes was an adapted design of the patriot Oliver Pollock in 1778. Oliver Pollock was such a zealous patriot – known as the "Financier of the Revolution in the West" – that conjecture does not overstep its bounds in purporting this theory as viable.
Another theory is that it derives from "unit of silver", each unit being one "bit" of the "pieces of eight". Before the American Revolution, prices were often quoted in units of the Spanish dollar. According to this theory, when a price was quoted the capital 'S' was used to indicate silver with a capital 'U' written on top to indicate units. Eventually the capital 'U' was replaced by double vertical hash marks.
Another hypothesis is that it derives from the symbol used on a German Thaler. According to Ovason (2004), on one type of thaler one side showed the crucified Christ while the other showed a serpent hanging from a cross, the letters NU near the serpent's head, and on the other side of the cross the number 21. This refers to the Bible, Numbers, Chapter 21 (see Nehushtan).
There is a theory that the dollar sign goes back to the most important Roman coin, the sestertius, which had the letters 'HS' as its currency sign. When superimposed these letters form a dollar sign with two vertical strokes (the horizontal line of the 'H' merging into the 'S').
Robert Morris was the first to use that symbol in official documents and in official communications with Oliver Pollock. The US Dollar was directly based on the Spanish Milled Dollar when, in the Coinage Act of 1792, the first Mint Act, its value was "fixed" (per the U.S. Constitution, Article I, Section 8, clause 1 power of the United States Congress "To coin Money, regulate the Value thereof, and of foreign Coin, and fix the Standard of Weights and Measures") as being "of the value of a Spanish milled dollar as the same is now current, and to contain three hundred and seventy-one grains and four sixteenth parts of a grain of pure, or four hundred and sixteen grains of standard silver."
The dollar sign appears as early as 1847 on the $100 Mexican War notes and the reverse of the 1869 $1000 United States note. The dollar sign also appears on the reverse of the 1934 $100,000 note as well as the reverse of the 1917 $1 note.
Use in computer software
As the dollar sign is one of the few symbols that is, on one hand, almost universally present in computer character sets, but, on the other hand, rarely needed in their literal meaning within computer software, the $ character has been used on computers for many purposes unrelated to money. Its uses in programming languages have often influenced or provoked its uses in operating systems, and applications.
The dollar sign "$" has Unicode code point U+0024 (inherited from Latin-1).
In most shell scripting languages, $ is used for interpolating environment variables, special variables, arithmetic computations and special characters, and for performing translation of localised strings.
In ASP.NET, the dollar sign indicates an expression will follow it, when used in a tag in the web page. The expression that follows is .NET language-agnostic[disambiguation needed], as it will work with c#, vb.net, or any CLR supported language.
In Erlang, the dollar sign precedes character literals. The dollar sign as a character can be written $$.
In COBOL the $ sign is used in the Picture clause to depict a floating currency symbol as the left most character. The default symbol is $ however if the CURRENCY= or CURRENCY SIGN clause is specified, any single symbol can be used.
In CP/M and subsequently in all versions of DOS (86-DOS, MS-DOS, PC DOS, more) and derivatives, $ is used as a string terminator (Int 21h with AH=09h).
$ is used by the prompt command to insert special sequences into the DOS command prompt string.
In Microsoft Windows, $ is used at the end of the share name to hide a shared folder. For example, \\server\share is accessible and visible through browsing, while \\server\share$ is accessible only by explicit reference. Most administrative shares are hidden.
In Unix-like systems the $ is often part of the command prompt, depending on the user's shell and environment settings. For example, the default environment settings for the bash shell specify $ as part of the command prompt.
The using history expansion !$ (same as !!1$ and !-1$) means the last argument of the previous command in bash, !-2$ expands to the last argument of the penultimate command, !5$ expands into the last argument of the fifth command and so on. For example:
>touch my_first_file >echo"This is my file.">!$
where !$ expands into my_first_file.
In the LDAP directory access protocol, $ is used as a line separator in various standard entry attributes such as postalAddress.
The cifrão is also used to account for over 130,000,000 domestic standard U.S. Mint (1986+) bullion U.S. silver dollars as one dollar per one troy ounce fine (99.9%), thereby avoiding confusion with debased U.S. trade dollar-denominated tokens and Federal Reserve notes.
In Mexico and other peso-using countries, the cifrão is used as a dollar sign when a document uses pesos and dollars at the same time, to avoid confusions, but, when it used alone, usually is represented as US $ (United States dollars). Example: US $5 (five US dollars).
However, in Argentina, the $ sign is always used for pesos, and if they want to indicate dollars, they always write U$S 5 or US$ 5 (5 US dollars).
In the United States, Mexico, Australia, Argentina, New Zealand, Hong Kong, Pacific Island nations, and English-speaking Canada, the dollar or peso symbol precedes the number, unlike most currency symbols. Five dollars or pesos is written and printed as $5, whereas five cents is written as 5¢. In French-speaking Canada, the dollar symbol usually appears after the number (5$), although it sometimes appears in front of it, or instead may even be totally absent.
The dollar sign is also used in library cataloging to represent subsections.
^Arthur S. Aiton and Benjamin W. Wheeler (May 1931). "The First American Mint", The Hispanic American Historical Review11(2), 198 and note 2 on 198.
^Nussbaum, Arthur (1957). A History of the Dollar. New York: Columbia University Press. p. 56. "The foreign coins remained in circulation [in the United States], and the more important among them, especially the Spanish (including the Mexican) dollars, were declared by Congress on February 9, 1793, to be legal tender. The dollar sign, $, is connected with the peso, contrary to popular belief, which considers it to be an abbreviation of 'U.S.' The two parallel lines represented one of the many abbreviations of 'P,' and the 'S' indicated the plural. The abbreviation '$.' was also used for the peso, and is still used in Argentina."
^Riesco Terrero, Ángel (1983). Diccionario de abreviaturas hispanas de los siglos XIII al XVIII: Con un apendice de expresiones y formulas juridico-diplomaticas de uso corriente. Salamanca: Imprenta Varona, 350. ISBN 84-300-9090-8
^F. Cajori discusses the origins of the slash-8, the Potosi mint mark, the Pillars of Hercules, the "U.S.", the Roman sestertius, and the Boaz and Jachin theories and discounts them in A History of Mathematical Notations (Vol. 2), 15-20.
Cajori, Florian (1993). A History of Mathematical Notations. New York: Dover (reprint). ISBN0-486-67766-4. - contains section on the history of the dollar sign, with much documentary evidence supporting the "pesos" theory.
Cuhaj, George (2009). Standard Catalog of United States Paper Money. Krause Publications, 28th Ed. ISBN0-89689-939-X.