Sarmate.net Sarmate.net
Home Features Pricing Documentation Contact
Log in Sign up

Create probability tree diagrams — without writing a single line of code

Our visual editor automatically generates clean TikZ LaTeX code. Ready to compile.

Open the editor Read the guide
Visual probability tree diagram editor

What is the probability tree editor?

The Sarmate.net probability tree editor is a visual WYSIWYG online editor that lets you create weighted tree diagrams directly with your mouse — no prior LaTeX knowledge required. Name the events, enter the probabilities on the branches and add children. The corresponding TikZ code is generated in real time, ready to be used in your documents.

Who is this tool for?

Whether you're a math teacher preparing a test on conditional probability, a student solving Bayesian problems, or a professor creating lecture slides — the editor saves you valuable time. Hand-coding a probability tree in TikZ requires nested child blocks, careful indentation and precise edge labels. With the visual editor, you no longer need to worry about it.

Step-by-step guide

In a few steps, create a complete probability tree diagram:

1

Choose the tree structure

Choose a built-in preset (coin flip, conditional probability, binomial trial…) or start from an empty tree. Click + to add child nodes.

2

Name the events

Click on a node to edit its label. LaTeX formulas are supported: $\overline{A}$, $B \cap C$, etc. The KaTeX preview shows the result instantly.

3

Add probabilities on the branches

Enter probabilities directly on the branches: $\frac{1}{3}$, $P(A)$, etc. Choose the position (above / below / on the line) for each label.

4

Copy or test the code

The TikZ code is generated in real time in the lower panel. Click Copy to paste it into your document, or Test to compile it directly in the online editor.

Features

Flexible tree structure

LaTeX labels

Built-in presets

Clean TikZ code

Use cases

This editor is ideal for classic probability exercises:

Conditional probability

Tree with P(A), P(B|A), Bayes' formula.

Repeated trials

Binomial experiments, coin flips, dice rolls.

Urn problems

Drawing with and without replacement, multiple colors.

Medical tests

Sensitivity, specificity, positive predictive value.

Why use this editor instead of hand-coding?

Hand-coding a probability tree in TikZ is tedious and error-prone. Each node requires nested child { node { } } blocks, and weight labels need precise positioning (edge from parent node[midway, ...]). A missing brace breaks the entire document. With the visual editor:

Other visual editors

Discover our other free WYSIWYG editors for LaTeX:

Sign & variation tables Visual tkz-tab editor Colored boxes Visual tcolorbox editor TikZ & PSTricks figures WYSIWYG graphics editor LaTeX tables Visual tabular editor

See all editors: Visual LaTeX editors | Overleaf alternative

Ready to create your probability tree?

No download, no installation, no signup. Open the editor and start right away.

Open the editor — Free

Frequently asked questions

How do I create a probability tree diagram without writing TikZ code?

Open the visual editor, click to add nodes (events) and edges (probabilities), and Sarmate generates the matching TikZ-LaTeX code automatically. You can then copy the code into your document, no installation needed.

Can I edit the generated TikZ code afterwards?

Yes. The TikZ code is plain LaTeX — paste it into any editor and tweak colors, spacing, labels, or add packages. The output is human-readable, not minified.

Do I need to create an account to use the probability tree editor?

No. The editor works directly in your browser without signup. Sarmate offers a free account if you want to save your trees in the cloud, but it's optional.

What kinds of probability trees can I build with this editor?

Conditional probability trees (Bayes), independent and dependent events, multi-level trees with up to 4-5 branches per node, and weighted edges. The editor supports both fractions and decimals on probabilities.