Formula Bro

Math and physics formulas, explained like you are new.


Euler's Formula for Planar Graphs

In one sentence: Euler’s formula says that if you draw a connected network on a flat sheet with no crossing lines, then corners minus lines plus regions always comes to 2.

V−E+F=2V - E + F = 2

Read it out loud: “V minus E plus F equals 2. V is the number of vertices, the corner points or dots of the drawing. E is the number of edges, the lines that join the vertices. F is the number of faces, the regions the drawing cuts the paper into, counting the outside too. Work from left to right: take the lines away from the corners, then add the regions.”

Before you start

The ideas and signs this page uses, explained from zero. For powers of ten, Greek letters and other notation in general, see Math basics.

Graph, vertex and edge

A graph is a set of vertices, which are dots or corners, joined by edges, which are lines. A graph records which corners are joined, not the exact length or shape of the lines. A map of roads, with the junctions as corners and the roads as lines, is a graph.

Planar and connected

A graph is planar when you can draw it on a flat sheet so that no two edges cross, except where they meet at a shared vertex. A graph is connected when you can walk from any vertex to any other by following the edges. A drawing made of two separate pieces is not connected.

Faces, the regions of a drawing

A face is one region of the flat paper that is enclosed by lines, with no line passing through it. A single closed loop, such as a triangle, cuts the paper into two faces: the inside and the outside. The region outside the whole drawing counts as a face as well, so it is always included in the count FF.

Reading V−E+FV - E + F with plus and minus signs

The formula combines three counts with a minus sign and a plus sign. Work from left to right: first subtract EE from VV, then add FF. A minus sign takes a quantity away, and a plus sign adds it back. The middle step can be below zero, such as 8−12=−48 - 12 = -4, which is a number to the left of zero on the number line. That is allowed.

Sphere and the number 2

A sphere is a ball shape, like a globe, with no holes in its surface. A flat map can be wrapped onto the surface of a sphere. Mathematicians measure the shape of a surface with a single number, the Euler characteristic, and for a sphere that number is 2. The formula’s answer of 2 comes from this fact about the sphere.

What each symbol means

SymbolMeaning

VV

The number of vertices: the corner points or dots of the drawing, the places where lines meet. It is a plain count with no unit. The cube example has 8 vertices, one at each corner of the cube.

EE

The number of edges: the lines that join the vertices, with each edge joining two vertices. It is a plain count with no unit. The cube example has 12 edges, one for each edge of the cube’s frame.

FF

The number of faces: the regions the drawing divides the flat paper into, with the outside region counted as one of them. It is a plain count with no unit. The cube example has 6 faces: an inner square, four trapezoids between the squares, and the outside.

The formula piece by piece

VV

Start with the corners. VV counts the dots of the drawing, the places where lines meet. Each corner is one vertex. In the cube example, V=8V = 8, one for each corner of the cube.

EE

The lines. EE counts the edges, the segments of line between corners. A cube’s frame has 12 such segments, so E=12E = 12. Each edge is counted once, however the drawing is shaped.

FF

The regions. FF counts the faces, the pieces of paper enclosed by the lines, plus the outside. For the cube drawing it is 6: the inner square, four trapezoids between the squares, and the outside region.

V−EV - E

Corners minus lines. Starting from the corners and taking away the lines gives 8−12=−48 - 12 = -4 for the cube. The result is negative, which is allowed, because the next step adds the faces back.

V−E+FV - E + F

The corners, minus the lines, plus the regions. Adding the faces to the corners-minus-lines total gives −4+6=2-4 + 6 = 2 for the cube. For any connected planar drawing, this total is also 2.

V−E+F=2V - E + F = 2

The whole formula as one sentence: the number of corners, minus the number of lines, plus the number of regions, always equals 2 for a connected drawing with no crossing lines.

F=2−V+EF = 2 - V + E

A standard rearrangement of the same law. If you know the corners and the lines, the faces are 2−V+E2 - V + E. For a drawing with 8 corners and 12 lines, that is 2−8+12=62 - 8 + 12 = 6 faces, which is the cube’s count.

What the formula is doing, and why

A graph is a set of vertices joined by edges. It is planar when it can be drawn on a flat sheet so that no two edges cross, except where they meet at a shared vertex. It is connected when you can walk from any vertex to any other along the edges.

What to count. Draw the graph on paper and count three things: the dots, the lines and the regions the drawing cuts the paper into. The regions are the faces, and the big region outside the drawing counts as one too. A triangle has 3 vertices, 3 edges and 2 faces: the inside and the outside.

Why this balance? The three counts always balance in the same way. Adding a new line that cuts a region in two adds one edge and one face, so V−E+FV - E + F stays the same. Adding a new corner in the middle of a line adds one vertex and one edge, which also keeps the balance. That is why the answer does not change when the drawing is moved or stretched.

Where the 2 comes from. A flat drawing can be wrapped onto the surface of a ball, like a map on a globe, and that surface has no holes. Mathematicians describe this kind of shape with the number 2. That is why the same count of corners, lines and faces gives 2 for a flat drawing, and also for solid shapes such as cubes.

The graph must be connected. If the graph falls into several separate pieces, the total becomes 1 plus the number of pieces, not 2. Check that the graph is connected before you use the value 2.

An everyday picture

Think of a map of a few countries drawn on a flat sheet. The borders are edges, the points where borders meet are vertices, and each country is a face. The sea outside the map is one more face. Counting the meeting points, the borders and the regions, including the sea, gives the same total of 2 that Euler’s formula predicts, however the countries are drawn.

Worked example: A cube drawn flat

A cube, such as a box or a die, has 8 corners, 12 edges and 6 square faces. To draw its frame on paper, draw one square, then a second, smaller square inside it, and join each corner of the outer square to the matching corner of the inner square. The drawing has no crossing lines. The region outside the outer square counts as one face. The cube is a real shape, and the counts below come from counting that drawing.

  1. Write down the three counts for the drawing. The drawing has V=8V = 8 corners, E=12E = 12 lines and F=6F = 6 regions. The regions are the inner square, four trapezoids between the two squares, and the outside. The outside region is easy to forget, so count it on purpose.
  2. Check the corners. The outer square has 4 corners and the inner square has 4 corners, and each outer corner is joined to its matching inner corner. That makes 4+4=84 + 4 = 8 corners, one for each corner of the cube.
  3. Check the lines. The outer square has 4 lines, the inner square has 4 lines, and the 4 joining lines link the two squares. That makes 4+4+4=124 + 4 + 4 = 12 edges, one for each edge of the cube’s frame.
  4. Put the counts into the formula. V−E+F=8−12+6V - E + F = 8 - 12 + 6. Work from left to right. 8−12=−48 - 12 = -4, which is below zero, and then −4+6=2-4 + 6 = 2. So the total is 2, as the formula says it must be.
  5. Test a second shape. A triangle drawn on paper has 3 corners, 3 edges and 2 faces: the inside and the outside. Then 3−3+2=23 - 3 + 2 = 2. The same total of 2 appears again, even though the shape is different, which is the point of the formula.
  6. Use the formula to find a missing count. Rearranging the formula gives F=2−V+EF = 2 - V + E. For a connected drawing with 8 corners and 12 lines, F=2−8+12=6F = 2 - 8 + 12 = 6 faces. So the faces do not have to be counted when the corners and lines are known.
  7. Say the rule plainly. Any two of the three counts give the third, so the formula is a shortcut as well as a check. It works for the cube’s flat drawing and for the triangle, which are very different pictures with the same total.

Answer: The cube frame gives 8−12+6=28 - 12 + 6 = 2, as the formula says. Because any two counts give the third, a connected planar drawing with 8 corners and 12 lines must have 6 faces.

The numbers in this example are recomputed by script every time the site is built.

Common mistakes

Where you will meet it

Questions people ask

Why does a triangle have 2 faces?

The triangle’s three edges split the paper into two regions, the inside and the outside. Both count as faces, so F=2F = 2, and 3−3+2=23 - 3 + 2 = 2.

Does the drawing change the answer?

No. You can move or stretch the drawing, and its three counts stay the same. Any valid flat drawing of a connected graph gives V−E+F=2V - E + F = 2.

What if the graph is not connected?

Then the total is 1 plus the number of separate pieces, not 2. So check that every corner can be reached from every other corner before you use the value 2.

Sources

  1. Planar graph, Wikipedia
  2. Euler characteristic, Wikipedia

| All Computer Science formulas |

Published 2026-10-22. Plain-text copy for AI agents and readers: computer-science/eulers-formula-for-planar-graphs.md.