Absolute value symbol | |

Absolute value is written with two vertical bars around a number: |−5| = 5. Click a bar to copy it, or grab a ready-made |x| and the double bars ‖ ‖ used for vector length.

How to type it 22 symbols on this page

Absolute value bars7

Ready-made bars4

Formulas5

Related brackets6

How to type |

Copy and paste

Click to copy it, then paste with Ctrl + V (⌘ + V on a Mac) or a long press on phones.

Windows

Press Win + . to open the emoji and symbol panel, then search for “vertical bar (absolute value)”.

In Microsoft Word, type 007C and press Alt + X.

Mac

Press Control + ⌘ + Space to open the Character Viewer, then search for “vertical bar (absolute value)”.

iPhone and Android

Copy it here and paste it. To type it again later, save it as a text replacement (iPhone: Settings › General › Keyboard › Text Replacement; Gboard: Settings › Dictionary › Personal dictionary).

HTML and CSS

Unicode U+007C. Every format is on the vertical bar (absolute value) page.

Codes for every absolute value symbol

SymbolNameUnicodeHTMLAlt code
vertical bar (absolute value) U+007C | –
divides U+2223 ∣ –
double vertical line U+2016 ‖ –
parallel to U+2225 ∥ –
broken bar U+00A6 ¦ Alt 0166
fullwidth vertical line U+FF5C | –
vertical line extension U+23D0 ⏐ –
left floor U+230A ⌊ –
right floor U+230B ⌋ –
left ceiling U+2308 ⌈ –
right ceiling U+2309 ⌉ –
left angle bracket U+27E8 ⟨ –
right angle bracket U+27E9 ⟩ –

What absolute value means

The absolute value of a number is its distance from zero, so it is never negative: |−7| = 7, |7| = 7 and |0| = 0. You write it by putting the number between two vertical bars, a notation introduced by Karl Weierstrass in 1841.

Because distance has no direction, |a − b| gives the gap between two numbers no matter which is bigger. Equations and inequalities with absolute value often have two answers: |x| = 4 means x = 4 or x = −4 (written x = ±4 with the plus minus symbol), and |x − 2| < 4 means −2 < x < 6.

For complex numbers, |z| is called the modulus, and for vectors the double bars ‖v‖ give the length, or norm.

Which vertical bar to use

The plain keyboard bar | (vertical line, also called the pipe) is the right choice for absolute value in everyday text. ∣ is a math relation meaning "divides" (3 ∣ 12) and is also used for "such that" in set notation. ‖ is the double bar for norms, while ∥ means "is parallel to". ¦ (broken bar) has no math meaning.

Avoid typing a lowercase l, a capital I or the digit 1 as a bar. They look similar in some fonts but break formulas and confuse screen readers.

How to type absolute value bars

On US keyboards, | is Shift + backslash (the \ key above Enter). On Windows you can also hold Alt and type 124. On iPhone, tap 123, then #+=. On Android with Gboard, tap ?123, then =\<.

In LaTeX, |x| works, but \lvert x \rvert spaces better and \left| \frac{a}{b} \right| grows with tall content. Use \lVert v \rVert for norms. In Excel and Google Sheets, =ABS(-5) returns 5, and most programming languages have an abs() function. More bracket types are on the bracket symbols page.

Frequently asked questions

What is the absolute value symbol called?

It is written with two vertical bars, | |. The bar is officially named "vertical line" and is often called a pipe.

How do you type absolute value on a keyboard?

Press Shift + backslash to type |, then type the number and another |, for example |−3|.

Can absolute value be negative?

No. Absolute value is a distance, so it is always zero or positive.