Skip to content

LaTeX Equation Editor

Type LaTeX math — or build it from a toolbar of fractions, roots, sums, integrals, matrices, Greek letters and accents — and see it rendered as you type. Copy the LaTeX for a paper or slides, or copy MathML that Microsoft Word pastes as an editable equation. Runs in your browser; nothing is uploaded. Free, no sign-up.

Type the math itself, without $ signs. Rendered as you type by KaTeX, in your browser.

Insert

Structures

Greek letters

Operators and relations

Accents and fonts

Layout

Preview

x=−b±b2−4ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
Show the MathML

How to Use the LaTeX Equation Editor

  1. 1. Type or paste the math. Write only what goes between the dollar signs, such as \frac{a}{b}; the preview updates with each keystroke. The box starts with the quadratic formula.
  2. 2. Insert templates and symbols. The toolbar adds fractions, roots, sums, integrals, matrices, Greek letters and accents at the cursor. Select a term first and a template wraps it: select x+1 and press √x to get \sqrt{x+1}.
  3. 3. Choose display or inline. Display equations sit on their own line with full-size fractions and limits; inline math is compressed to fit a line of text.
  4. 4. Fix anything flagged. When KaTeX cannot read the input, the message names the problem and the character where reading stopped — the mistake is usually just before it, often a missing brace.
  5. 5. Copy what you need. Copy LaTeX for Overleaf or Beamer, Copy MathML for Word for a Word document, or Download .html for a web page.

LaTeX Math in Five Minutes

You typeYou getNotes
x^2, a_nx², aₙA superscript or subscript takes one character. Wrap anything longer in braces.
\frac{a}{b}a stacked fractionInline, fractions shrink; \dfrac keeps them full size.
\sqrt{x}, \sqrt[3]{x}√x, ∛xThe optional argument in square brackets sets the root's index.
\sum_i x_i, \int_0^1 f(x)\,dx∑ and ∫ with limits\, adds the thin space typeset before dx.
\alpha, \beta, \Gammaα, β, ΓCapital Greek letters that look like Latin ones (A, B, E…) have no command — type the Latin letter.
\le, \ne, \approx, \pm, \times≤, ≠, ≈, ±, ×The LaTeX Symbol Finder lists several hundred more.
\left( … \right)brackets that growWorks with [, | and braces written \{, \}.
\text{if } x > 0upright wordsSpaces inside \text are kept; outside it, LaTeX ignores them.
\mathbb{R}, \mathbf{v}, \mathrm{d}ℝ, bold v, upright dIn a document, \mathbb needs the amssymb package.
\begin{aligned} … \end{aligned}aligned lines& marks the alignment point and a double backslash ends each line. Needs amsmath.

Pasting Equations into Word, Google Docs and Slides

Microsoft Word for Windows recognises MathML pasted as plain text and turns it into a native, editable equation; it has read MathML from the clipboard since Word 2007. Click Copy MathML for Word and paste with Ctrl+V. If the markup lands as text, paste again with Keep Text Only from the paste options, so no formatting travels with it.

Recent versions of Word, Microsoft 365 included, also take LaTeX directly: press Alt+= for a new equation, choose LaTeX as the input format on the Equation tab, paste the LaTeX, then choose Convert, Professional (Ctrl+=). Word's LaTeX mode covers the common commands but not \begin … \end environments such as matrices — use the MathML route for those.

Google Docs does not convert pasted LaTeX or MathML. Choose Insert, Symbols, Equation, then type backslash commands one at a time — \alpha, \frac, \sqrt — each followed by a space, and Docs turns them into symbols and templates as you go.

Beamer, Overleaf and other LaTeX documents take the code as it is: Copy as $…$ for math inside a sentence, or Copy with display brackets for an equation on its own line. For PowerPoint, build the equation in Word and copy it across — Office equations paste between Office apps.

A Worked Example

With the quadratic formula in the box and Display selected, Copy MathML for Word puts this on the clipboard — presentation MathML in the MathML namespace, with KaTeX's TeX annotation removed:

LaTeX

x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}

MathML

<math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><mrow><mi>x</mi><mo>=</mo><mfrac><mrow><mo>−</mo><mi>b</mi><mo>±</mo><msqrt><mrow><msup><mi>b</mi><mn>2</mn></msup><mo>−</mo><mn>4</mn><mi>a</mi><mi>c</mi></mrow></msqrt></mrow><mrow><mn>2</mn><mi>a</mi></mrow></mfrac></mrow></math>

Each piece maps onto the LaTeX: <mfrac> is the fraction with its two <mrow> halves, <msqrt> the root, <msup> the square, <mi> the variables and <mo> the operators — including the true minus sign (−) that LaTeX sets for a hyphen in math. Word builds its equation from this structure, so the result is editable rather than a picture.

What the Preview Can and Cannot Show

The preview is drawn by KaTeX, the open-source library behind math on many sites. It covers almost all of LaTeX's math mode, including the amsmath environments aligned, cases, pmatrix and bmatrix, but it is not a full TeX engine: packages beyond those and anything outside math mode are not available. Most formulas that render here compile in LaTeX with amsmath and amssymb loaded, though KaTeX also accepts a few shortcuts of its own, such as \R for ℝ, that standard LaTeX does not define. Commands that could fetch or link content, like \href and \includegraphics, are switched off.

Frequently Asked Questions

How do I write an equation in LaTeX?
Inline math goes between dollar signs, as in $E = mc^2$; a displayed equation goes in display brackets or an equation environment, which also numbers it. Inside, ^ and _ make superscripts and subscripts, braces group, and backslash commands give symbols and structures. This editor works on the part inside the delimiters and adds them when you use the delimiter copy button.
How do I paste a LaTeX equation into Word?
On Word for Windows, copy the MathML here and paste it — Word converts it into an editable equation. In recent versions of Word you can also paste the LaTeX itself into an equation set to LaTeX input and convert it to Professional. The MathML route also handles matrices and other environments that Word's LaTeX mode does not.
Why does my equation show an error?
Usually an unbalanced brace, a misspelled command such as \farc, or & used outside an environment that aligns columns. KaTeX reports the character where it stopped reading; the mistake is normally at or just before that point. Text with spaces needs \text{…}.
Does Google Docs support LaTeX?
Only as typing shortcuts. In an equation box (Insert, Symbols, Equation), a backslash command followed by a space becomes a symbol or template, but a whole LaTeX expression pasted in is not converted, and neither is MathML.
What is the difference between display and inline math?
Display math is set on its own line, centred, with full-size fractions and limits above and below sums and integrals. Inline math sits in a line of text and is compressed to keep the line spacing even, so fractions shrink and limits move to the side. Number and discuss display equations; use inline math for symbols and short expressions in sentences.
Can I number an equation?
In a LaTeX document, the equation environment numbers equations automatically, and \label with \ref refers to them. In this editor, \tag{1} at the end of a display equation shows a number, which is useful for checking how a numbered equation will look.
Is MathML accessible to screen readers?
Yes. MathML is the structured format screen readers read as mathematics, and current versions of all major browsers display it. The downloadable HTML snippet keeps your LaTeX inside the MathML as an annotation, so the source travels with the equation.

Related Tools

More in Data, Markup & Code

See all Data, Markup & Code