December 7, 2025

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.
Have handwritten fractions or equations from textbooks? Use Underleaf’s Image to LaTeX tool to convert them directly to LaTeX code. Upload your image and get clean, formatted LaTeX instantly!
Convert an imageThe 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.
For more complex expressions in numerator or denominator:
LaTeX automatically adjusts fraction size based on context. You can control this behavior with \dfrac (display style) and \tfrac (text style).
Use \dfrac{}{} to force display-style fractions even in inline math:
Use \tfrac{}{} for smaller fractions in display equations:
Converting complex fractions from PDFs or images? Underleaf’s AI-powered converter handles nested fractions, continued fractions, and complex mathematical expressions effortlessly. Save hours of manual typing!
Try it nowLaTeX automatically scales nested fractions. You can nest \frac commands inside each other:
For deeply nested fractions, consider using display style:
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:
For binomial coefficients, use \binom{}{} instead of fractions:
There’s also \dbinom and \tbinom for display and text styles:
Use \stackrel{}{} for putting symbols above relations:
For more control, use \overset and \underset:
Working with textbook equations full of complex fractions? Upload a screenshot to Underleaf’s converter and get perfectly formatted LaTeX code in seconds. Perfect for homework, research papers, and lecture notes!
Save time with Image → LaTeX tool\tfrac for inline math to save vertical space, \dfrac in display equations for readability\left( and \right) around complex numerators/denominators for clarity\binom for binomial coefficients, not \frac\quad or \qquad to separate multiple fractions for better readabilityFor inline text, sometimes a slash is more readable than \frac:
This is especially useful in inline text for simple fractions.
Need help with complex fraction equations? Underleaf’s Image to LaTeX tool can convert screenshots, handwritten notes, or PDFs into clean LaTeX code. Try it for free and save time on your next project!
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.
Empowering students and researchers with AI-powered tools for academic writing.
Go to appContact us© 2026 Underleaf. All rights reserved.