LatexNotes

Pi (Π π) in LaTeX

In LaTeX, \pi gives the lowercase pi (π) and \Pi gives the uppercase pi (Π), both in maths mode; \varpi produces the variant form (ϖ).

LaTeX command

\Pi

Not the symbol you meant? Draw it to find the command →

Typing up handwritten notes? Convert a whole page of handwriting to LaTeX →

Lowercase pi, \pi, is best known as the constant π ≈ 3.14159, the ratio of a circle's circumference to its diameter. As a variable it also denotes the prime-counting function \pi(x), a projection map in geometry and algebra, and a probability or mixing proportion in statistics and machine learning. It must be used in maths mode.

Uppercase pi, \Pi, is the letter form and can denote a product of spaces, a projection operator or osmotic pressure. Note that the large product operator in expressions like \prod_{k=1}^{n} k is the separate command \prod, not \Pi; \prod grows with its limits, while \Pi stays letter-sized.

The variant \varpi gives a curly form (ϖ) resembling a cursive omega, useful as a distinct second pi, for instance a longitude of perihelion in orbital mechanics. All three commands render without extra packages in KaTeX; \pi is italic by default, and \boldsymbol{\pi} makes it bold.

Other forms

\pilowercase pi
\Piuppercase pi (Π)
\varpicurly / variant form

Examples

$\pi \approx 3.14159$

the circle constant

$A = \pi r^2$

the area of a circle

$\pi(x) \sim \frac{x}{\ln x}$

the prime-counting function

$\Pi$

uppercase pi (the letter, not \prod)

$\varpi$

the variant form

Tips and common mistakes

Working from handwritten notes?

LatexNotes turns a photo or PDF of handwritten mathematics into LaTeX, graphs and all. It is built with real pdflatex before you see it, and the .tex file is yours to edit or take to Overleaf. Free to try, no sign-up.

See how handwriting to LaTeX works, step by step, or go from GoodNotes to LaTeX if you write on an iPad (Notability works the same way).

Convert your maths to LaTeX →

FAQ

What is the difference between \Pi and \prod?

\Pi is the uppercase letter pi (Π), letter-sized. \prod is the product operator that grows to fit its limits, as in \prod_{k=1}^{n} k. Use \prod for products.

How do I write a variant pi?

Use \varpi, which renders the curly form ϖ. It works in KaTeX and standard LaTeX without extra packages.

How do I type the constant pi?

Use \pi inside maths mode, for example or .

See also