Skip to main content
v2026.11,986 entries · CC-BY 4.0

Division in LaTeX: \div, \frac and Long Division

Which LaTeX command to use for a division sign, a fraction, long division or a line break, with sources.

Written and maintained by CASRAI Editorial Board

Published · Last updated

On this page

Researchers and analysts who search for division in LaTeX usually need one of four different things: a division sign inside a formula, a stacked fraction, a long-division layout, or a way to split an equation across lines. This guide separates them and gives the command for each. The commands below are taken from Overleaf’s documentation and the CTAN package listing, both read on 2026-11-07.

What is the LaTeX symbol for dividing?

The division sign (÷) is typed with \div, in math mode, for example $a \div b$. Overleaf’s list of Greek letters and math symbols places \div and \times together under “Binary Operation/Relation Symbols”, which means LaTeX treats it as an operator between two operands, not as a fraction.

For other relation and operator symbols, see the CASRAI guides on less-than in LaTeX, greater-than in LaTeX and the therefore symbol in LaTeX.

Which notation for which job

“Division” covers four separate tasks, and search results for the phrase mix them together. Use this table to pick the right one.

Your task Use What the source says
Division sign between two terms in a line of text or a formula \div Listed with \times under binary operation symbols (Overleaf symbol list)
Numerator over denominator \frac{numerator}{denominator}, e.g. \frac{1}{2} Overleaf, Fractions and Binomials
Continued fraction \cfrac (needs the amsmath package) Overleaf: designed specifically to produce continued fractions
Long division worked out on the page The longdivision package (macros \longdivision and \intlongdivision) CTAN package listing, version 1.2.2, 2023-10-21
Splitting a long equation or text across lines \\ Overleaf, Line breaks and blank spaces

Fractions with \frac

A fraction is typeset with \frac{numerator}{denominator}; Overleaf’s example is \frac{1}{2}. If the reader should see a stacked fraction rather than a division sign, use this, not \div.

Two further controls are documented. \cfrac produces continued fractions and requires amsmath (\usepackage{amsmath}). The \displaystyle and \textstyle commands change how large a fraction is set and how it is spaced. Source: Overleaf, Fractions and Binomials.

How do I type the long division symbol?

Base LaTeX has no single command for the long-division bracket layout. The CTAN package longdivision typesets it. The package provides the macros \longdivision and \intlongdivision, requires xparse (part of the l3packages bundle), and is distributed in TeX Live and MiKTeX under the LaTeX Project Public License. According to the CTAN listing, the dividend must be a positive decimal and the divisor a positive integer, repeating decimals are shown with a bar over the repeating part, and dividends of up to about 20 digits work well while 20 to 60 digits work less gracefully. The package manual on CTAN gives the exact argument syntax. A related package, longdiv, is listed on the same page.

What does \\ do in LaTeX?

Two backslashes force a line break; Overleaf’s example shows it behaving the same as \newline and \hfill \break, and the text after the break is not indented. It is the answer to “dividing an equation into two lines”, which is a layout question rather than arithmetic. Variants documented on Overleaf, Line breaks and blank spaces: the starred form \\* breaks the line but prohibits a page break at that point, and \linebreak[n] takes a priority from 0 (easily ignored) to 4 (always applied).

How to write | in LaTeX?

The vertical bar is a different symbol from division. It is covered separately in the vertical line in LaTeX.

Free alternatives

Need Free route Source
Division sign and fractions Built in: \div and \frac; \cfrac needs the amsmath package Overleaf documentation
Long-division layout The longdivision package (LPPL licence), available through TeX Live and MiKTeX CTAN

FAQ

Is division in LaTeX the same as a fraction?

No. \div gives the ÷ operator between two terms; \frac stacks a numerator over a denominator. Choose by how the reader should see the expression.

Can I show repeating decimals in long division?

Per CTAN, the longdivision package puts a bar over the repeating part.

Sources

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about Division in LaTeX: \div, \frac and Long Division

Ask your first 2 questions free below. Subscribers get 150 a day for $29 a month.

An AI assistant specialized in research administration. It cites the sources behind every answer, labels web answers and says when it can't answer.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →