A fraction in LaTeX is always two brace groups held together by a command: \frac{a}{b}. Choosing between \frac, \dfrac and \tfrac does not change the values — it changes how tall the fraction is typeset in the context around it, which is the single most common reason a fraction looks wrong. Two neighbouring decisions decide the rest: whether the whole expression sits on one line (Align) and whether a bracket has to grow with it (Brackets).
Which one to use
\frac{a}{b}\dfrac{a}{b}\tfrac{a}{b}\cfrac{1}{1+\cfrac{1}{x}}\binom{n}{k}The commands
\frac{a}{b}
\dfrac{1}{\sqrt{2}}
\tfrac{1}{2}x
\cfrac{1}{1+\cfrac{1}{1+\cfrac{1}{x}}}
1/2
\binom{n}{k}
Worked examples
The same fraction, three sizes
\frac{\pi}{2} \qquad \dfrac{\pi}{2} \qquad \tfrac{\pi}{2}
Rendered in display maths, where all three look identical; the difference only appears when the same code sits inside a paragraph.
Nested fraction
\frac{1+\frac{1}{2}}{1-\frac{1}{3}}
Each level drops to text style automatically, which is why deep nesting becomes unreadable and \cfrac exists.
Mixed number
2\frac{1}{3}
A whole number followed by a fraction with no operator between them. Add a thin space with \, if it reads too tight.
Negative fraction
-\frac{b}{2a}
Put the minus outside the command. Writing \frac{-b}{2a} also works but reads worse and upsets alignment in some editors.
Common mistakes
- Forgetting braces on multi-token arguments:
\frac12works, but\frac12+xparses as\frac{1}{2}+x, not what you meant. - Using
\fracinline and then complaining the result is cramped — that is the intended behaviour. Reach for\dfracwhen you want it tall. - Nesting
\fracthree deep. The inner levels shrink to near-illegibility; use\cfracor split the expression across lines. - Writing
a/bfor something that is really a fraction of two expressions, e.g.a+b/c+dwhich is not(a+b)/(c+d).
Questions about this notation
What is the difference between \frac and \dfrac?
\frac follows the surrounding style, so it shrinks inside a sentence. \dfrac forces the full display size regardless. \tfrac does the opposite and forces the small inline size.Why does my fraction look squashed?
\dfrac.Do I need a package for \cfrac?
How do I write a complex fraction, where the numerator is itself a fraction?
\frac drops each inner level to text style, so a fraction inside a fraction comes out small and off to one side. Use \cfrac, which keeps every level centred at full size, or split the expression over lines with \frac{1+\frac{1}{2}}{1-\frac{1}{3}} inside an aligned block. Two levels is the practical limit before it stops being readable.Keep reading
Three ways into the same idea: the notation itself, the lesson that teaches it, and an article that applies it.