Underleaf Logo
Underleaf
AboutPricingBlog
Log InGet started

How to Write Fractions in LaTeX

December 7, 2025

How to Write Fractions in LaTeX

Fractions are fundamental to mathematical writing, and LaTeX provides multiple ways to display them beautifully. This comprehensive guide covers everything from basic fraction syntax to advanced formatting techniques for nested and complex fractions.

Basic Fraction Syntax

The most common way to write fractions in LaTeX is using the \frac{}{} command. The first argument is the numerator and the second is the denominator.

Simple Fractions

For more complex expressions in numerator or denominator:

Display vs Inline Fractions

LaTeX automatically adjusts fraction size based on context. You can control this behavior with \dfrac (display style) and \tfrac (text style).

Display Style Fractions

Use \dfrac{}{} to force display-style fractions even in inline math:

Text Style Fractions

Use \tfrac{}{} for smaller fractions in display equations:

Nested Fractions

LaTeX automatically scales nested fractions. You can nest \frac commands inside each other:

For deeply nested fractions, consider using display style:

Continued Fractions

Continued fractions are a special case that requires careful formatting. The cfrac command from the amsmath package is designed for this:

Golden ratio as a continued fraction:

Binomial Coefficients

For binomial coefficients, use \binom{}{} instead of fractions:

There’s also \dbinom and \tbinom for display and text styles:

Fraction-Like Structures

Stacked Relations

Use \stackrel{}{} for putting symbols above relations:

Over and Under

For more control, use \overset and \underset:

Common Fraction Patterns

Derivatives

Integrals with Fractions

Limits with Fractions

Best Practices for Fractions

  • Choose appropriate size: Use \tfrac for inline math to save vertical space, \dfrac in display equations for readability
  • Avoid deep nesting: More than 2-3 levels of nested fractions become hard to read. Consider rewriting the expression
  • Use parentheses: Add \left( and \right) around complex numerators/denominators for clarity
  • Consistent notation: Stick to one style (slash vs. fraction) throughout your document when appropriate
  • Special cases: Use \binom for binomial coefficients, not \frac
  • Spacing: Use \quad or \qquad to separate multiple fractions for better readability

Alternative Notation: Slashes

For inline text, sometimes a slash is more readable than \frac:

This is especially useful in inline text for simple fractions.

Field-Specific Examples

Physics: Kinematic Equations

Statistics: Probability

Chemistry: Concentration

Engineering: Transfer Functions

Mastering fractions in LaTeX is essential for any technical or scientific writing. Whether you’re working with simple ratios or complex nested expressions, these techniques will help you create professional, readable mathematical documents. Remember to choose the appropriate fraction style for your context and maintain consistency throughout your work.

Underleaf Logo
Underleaf

Empowering students and researchers with AI-powered tools for academic writing.

Go to appContact us

Company

PricingBlogLearnAffiliate Program

Free Tools

Image to LaTeXExcel to LaTeXArXiv to LaTeXTikZ GeneratorThesis GeneratorOverleaf Chrome ExtensionAll Tools

© 2026 Underleaf. All rights reserved.