Blog / Compare

Minus sign vs hyphen

Minus Sign U+2212
Hyphen U+2010

When to use which

CharacterWhen to use itWatch out for
Minus SignSubtraction and negative numbers in anything a person reads: prose, a table of figures, a slide, a caption explaining a calculation.Keep it out of code and formulas. Parsers want the ASCII key and will reject this character as unrecognised.
HyphenJoining words and breaking them across a line: well-known, self-employed, twenty-nine.Your keyboard does not produce it. The key emits hyphen-minus, U+002D, which does both jobs at once and neither exactly.

Most typographic corrections run in one direction. There is a right character, there is a keyboard approximation, and you upgrade wherever you can. This pair does not behave that way. Which of the two you want depends on whether the text is going to be read or parsed, and doing it correctly in one context is precisely what breaks it in the other.

The minus sign is an arithmetic operator. It is drawn to the length and weight of the plus sign it works beside, and it sits on the maths axis — the horizontal reference line a font defines separately from the text baseline so that operators and fraction bars align with each other rather than with the bottoms of the letters. The hyphen is punctuation. It glues words together and breaks them at the end of a line, and it is shorter and rides lower, because that is what a word-level mark needs to be.

Neither is on your keyboard. The key between zero and equals emits U+002D, hyphen-minus, which Unicode's own chart describes as being used generically for hyphen, minus sign or en dash — all of which, it notes, have dedicated alternatives. That is a standards body conceding the character is a typewriter compromise: one piece of metal had to cover every short horizontal stroke, ASCII inherited the arrangement, and every keyboard since has kept it.

The difference is easy to see once there is a plus sign nearby for comparison. Set 7 - 3 and 7 − 3 one above the other and the ASCII version reads as a stunted stroke sitting slightly too low, while the real one matches the crossbar of the + exactly, because it is the same stroke at the same height. In a column of figures the mismatch compounds: negatives set with hyphens sit lighter and lower than the plus and equals signs around them, and the column stops looking typeset without anyone being able to say why.

The warning runs the other way in anything a machine reads. Programming languages, spreadsheet formulas, CSV imports and search boxes all parse ASCII; paste a real minus into a calculation and you get an error, usually an unhelpful one, because most fonts draw the two close enough that you will read past the difference a dozen times looking for something else. Word processors and editors that helpfully substitute typographic characters are the usual culprit — copy a formula out of a document into a terminal and the substitution travels with it.

The hyphen has a quieter version of the same problem and a more forgiving answer. U+2010 is the unambiguous one, narrower than the keyboard character and meaning nothing but hyphen, and hardly anybody types it, because ASCII is what keyboards emit and what decades of legacy encodings entrenched. For ordinary hyphenation that costs nothing. Where it does cost something is line breaking: since a hyphen-minus might be a minus sign, the breaking algorithm has to infer from context whether it is allowed to break after it, and U+2010 removes the guess — Unicode 17 went as far as giving it a line-break class of its own for exactly that reason.

So the rule is short, and it is a rule about destination rather than about correctness. In prose, tables and anything typeset, use U+2212 or − for arithmetic and let the keyboard key handle hyphenation, which is the one job it does honestly. In code, formulas, filenames and anything you will later search through, use ASCII for both and leave the typography to whatever renders it.

← More from the blog