LaTeX Fraction Generator
Generate \frac / nested fractions from numerators and denominators.
About this tool
Enter a/b, or a numerator and denominator, and choose \frac, \dfrac or \nicefrac to get the LaTeX code.
How to use
How it works
\frac scales with the surrounding style, \dfrac forces display size inside inline math, and \nicefrac gives a slanted inline fraction and needs the nicefrac or units package. Expressions with operators, such as x+1, go inside the braces unchanged.
\frac{a}{b} \dfrac{a}{b} \nicefrac{a}{b}Worked example
Three quarters
- Input
- 3/4
- Output
- \frac{3}{4}
- Walkthrough
- dfrac gives \dfrac{3}{4}, nicefrac gives \nicefrac{3}{4}. Numerator x+1 and denominator y gives \frac{x+1}{y}.
Limitations
- Text conversion only; no preview.
- Needs amsmath for \dfrac and nicefrac for \nicefrac.
Questions
When should I use \dfrac?
Does nicefrac need a package?
Can I use expressions?
Features
- Three fraction styles
- Slash shortcut
- Runs in your browser
Related resources
Guides and videos from around the web—opens on YouTube or the publisher’s site.
PDF, What is it FOR?
Computerphile
Papers and appendices often ship as fixed PDF packets.
Watch on YouTubeLearn JSON - Full Crash Course
freeCodeCamp.org
Structured citation data often serializes as JSON/CSL.
Watch on YouTube
- MLA citations by format
MLA Style Center
MLA works-cited patterns for academic tools.
- APA reference examples
APA Style
Official APA examples for citation generators.