
How to Add Math Equations to Confluence
Short answer: Confluence Cloud has no built-in equation editor, so you add math with a Marketplace macro. With LaTeX Math for Confluence installed, edit the page, type /latex, pick the inline or block macro, write standard LaTeX such as \frac{a}{b} and insert it. The equation renders on the page with KaTeX and stays editable.
If you want to add math equations to Confluence, you'll find that Confluence Cloud doesn't include a built-in LaTeX equation editor. You can type x^2 as plain text or paste a screenshot, but neither holds up: plain text loses precision, and screenshots go stale the moment the formula changes.
This guide shows how to add math equations to Confluence Cloud with LaTeX Math for Confluence, a free Marketplace app. You write standard LaTeX math, see a live preview, and the equation renders on the page with KaTeX.
What You Need
- A Confluence Cloud site (the app is not available for Server or Data Center)
- LaTeX Math for Confluence installed by a Confluence administrator
- Edit permission on the page
Installation takes a few minutes from the Marketplace. See the installation guide if you're the admin.
Step by Step: Insert an Equation
- Open a Confluence page and click Edit.
- Place your cursor where the equation should go.
- Type
/latex. Two options appear:- LaTeX Math for Confluence (Inline) for an equation inside a sentence
- LaTeX Math for Confluence (Block) for an equation on its own line
- Select the one you need. The macro editor opens.
- Type your LaTeX and watch the live preview update as you type.
- Click Insert (or Save), then publish the page.
To change an equation later, edit the page, click the equation, update the LaTeX and save. To remove it, select the macro and press Delete.
Inline vs Block Equations
Inline equations sit inside a line of text and match the surrounding font size. Use them for variables and short expressions, for example "where σ is the standard deviation" or "the loss is O(n log n)". Keep them short: display-style delimiters, multi-line environments and large matrices don't belong in the inline macro.
Block equations render in display mode, centered by default, larger and separated from the text. Use them for the formulas readers need to study: derivations, matrices, systems of equations and anything multi-line. You can switch a block equation to left or right alignment with the alignment buttons in the editor's preview pane.
A good rule: if the equation has a fraction inside a fraction, a matrix, or more than one line, use a block. For more on how LaTeX treats inline math, see our LaTeX inline math guide.
Delimiters Are Optional
You don't need delimiters at all. The inline macro treats its content as inline math and the block macro renders in display mode automatically. If you paste LaTeX from another tool that already includes delimiters, these are accepted:
| Macro | Accepted input |
|---|---|
| Inline | E = mc^2, $E = mc^2$ or \(E = mc^2\) |
| Block | E = mc^2, $$ ... $$, \[ ... \] or an environment such as \begin{equation} ... \end{equation} |
Display delimiters such as $$ inside the inline macro are converted to inline math.
Common LaTeX Syntax
| What you want | LaTeX |
|---|---|
| Superscript / subscript | x^2, x_i, x_{ij}^{2} |
| Fraction | \frac{a}{b} |
| Square root, nth root | \sqrt{x}, \sqrt[n]{x} |
| Summation | \sum_{i=1}^{n} x_i |
| Integral | \int_{a}^{b} f(x)\,dx |
| Limit | \lim_{x \to \infty} f(x) |
| Partial derivative | \frac{\partial f}{\partial x} |
| Greek letters | \alpha, \beta, \sigma, \Sigma |
| Relations | \leq, \geq, \neq, \approx |
| Text inside math | \text{if } x > 0 |
Use braces to group anything longer than one character: x^{10}, not x^10. For more commands, including log and ln and logical and/or, see the LaTeX symbols reference.
Block examples
The normal distribution's probability density function:
f(x) = \frac{1}{\sigma\sqrt{2\pi}} e^{-\frac{1}{2}\left(\frac{x-\mu}{\sigma}\right)^2}
A matrix:
A = \begin{bmatrix}
a & b \\
c & d
\end{bmatrix}
A piecewise function:
f(x) = \begin{cases}
x^2 & \text{if } x \geq 0 \\
-x^2 & \text{if } x < 0
\end{cases}
Aligned multi-line steps, using & to line up the equals signs and \\ for line breaks:
\begin{aligned}
f(x) &= x^2 + 2x + 1 \\
&= (x + 1)^2
\end{aligned}
If you can't remember a command, the LaTeX symbol reference lists the command, variants and an example for common symbols, including arrows, Greek letters, set and logic symbols, with a copy button for each.
What KaTeX Supports, and What It Doesn't
LaTeX Math for Confluence renders with KaTeX. KaTeX covers most LaTeX math: fractions, roots, sums, integrals, matrices and arrays, aligned equations, colors such as \textcolor{red}{x} and the common symbols and operators.
It is not a full LaTeX installation, so a few things won't render:
- Drawing packages such as TikZ/PGF
- Custom or extra LaTeX packages (anything you'd load with
\usepackage) - Non-math LaTeX such as sections, document layout or bibliographies
If an equation shows an error, the live preview tells you while you're still editing. Check for a missing brace or a typo first, then look the command up in the KaTeX supported functions list. The symbol reference also flags the symbols that need LaTeX-only packages.
For long pages, our docs suggest keeping to roughly 20 to 30 equations per page for best loading performance, and splitting very long derivations across pages.
Exporting Pages with Equations
According to the app documentation, equations are included when you export a page with Confluence's built-in PDF or Word export, with no extra configuration. Equations also render in dark mode and on mobile.
Controlling Who Can Edit Equations
By default, anyone who can edit a page can add and edit equations. A Confluence admin can turn on Restrict edit access in the app settings (Confluence Administration → Manage Apps → LaTeX Math for Confluence → Configure → Permissions) and add specific users to an allow list. Admins always keep access. Restricting edits doesn't hide anything: everyone who can view the page still sees the rendered equations. See access control for details.
Moving from Another Math App
If your pages already use another LaTeX app, the built-in migration tool finds those macros and converts them, saving each page as a new version so you can roll back. Read switching LaTeX math apps in Confluence and the migration docs.
Examples by Team
- Data science: loss functions, metrics and optimisers in how data science teams document ML models in Confluence
- Finance: Black-Scholes, VaR and duration in how finance teams document quantitative models
Quick Recap
- Install LaTeX Math for Confluence (free).
- Edit a page and type
/latex. - Choose Inline for math in a sentence or Block for a standalone equation.
- Write LaTeX, check the preview, insert and publish.
Full documentation: LaTeX Math for Confluence docs, starting with adding macros.
Questions? Reach out via our support portal.


