Cake Number Calculator
Cuts
- The cake number g(n) is the three-dimensional cousin of the lazy caterer: the most pieces a cake (a solid cylinder) can be divided into with n planar cuts.
- The closed form is g(n) = (n^3 + 5n + 6) / 6, so for n = 5: (125 + 25 + 6) / 6 = 26 pieces.
- Equivalently, g(n) adds the first four binomial coefficients: 1 + 5 + 10 + 10 = 26.
- Cut number 5 can add at most 11 new pieces, because a new plane can meet the cake in a two-dimensional lazy-caterer pattern of regions.
The cake number calculator tells you the maximum number of pieces a solid cake can be divided into with n planar cuts. Enter the number of cuts, and the calculator returns the cake number g(n) for that value. For example, g(3) = 8, g(5) = 26 and g(10) = 176. The cake number is the largest number of pieces any arrangement of n flat cuts can produce, so the result is a ceiling rather than a prediction for one particular way of slicing.
The calculator relies on the established cake number formula, g(n) = (n^3 + 5n + 6) / 6. The same value can be written as g(n) = C(n,0) + C(n,1) + C(n,2) + C(n,3); for n = 10 that is 1 + 10 + 45 + 120, which totals 176. This is the accepted standard for the problem because the cake number is the three-dimensional analogue of the lazy caterer's sequence, the corresponding two-dimensional result for a flat pizza or pancake. On this page you will find the formula shown in full, step-by-step workings, worked examples and the sources behind the method, so you can check each result yourself.
Worked examples
5 cuts give at most 26 pieces
(5)
| Cake number g(n) | 26 |
| Binomial sum C(n,0) to C(n,3) | 1 + 5 + 10 + 10 |
| Pieces added by cut n | 11 |
| C(n, 3) on its own | 10 |
3 cuts give at most 8 pieces
(3)
| Cake number g(n) | 8 |
| Binomial sum C(n,0) to C(n,3) | 1 + 3 + 3 + 1 |
| Pieces added by cut n | 4 |
| C(n, 3) on its own | 1 |
10 cuts give at most 176 pieces
(10)
| Cake number g(n) | 176 |
| Binomial sum C(n,0) to C(n,3) | 1 + 10 + 45 + 120 |
| Pieces added by cut n | 46 |
| C(n, 3) on its own | 120 |
What is a cake number?
The cake number answers a specific question: if you cut a solid cake with flat, straight planar cuts, what is the largest number of pieces you can end up with? Each cut is a single flat plane that passes through the whole cake, and you arrange the cuts to maximize the pieces. The cake number g(n) is the maximum number of pieces a solid cake can be divided into with n planar cuts. A cake number calculator applies this rule to whatever number of cuts you enter, so you can see the maximum piece count without drawing every slice by hand.
The key word is planar. You are not slicing a flat disc on a plate, where each cut is a straight line across a circle. In that two-dimensional problem, each new line can cross every earlier line once, and the pieces grow more slowly. A solid cake is three-dimensional, so each new plane can intersect every earlier plane, and those intersections carve extra regions into the cake. That is why the three-dimensional count climbs faster than the flat-disc count. The cake number is the three-dimensional analogue of the lazy caterer's sequence, the sequence that gives the maximum pieces of a flat disc from straight line cuts.
There is a tidy closed form for the result: g(n) = (n^3 + 5n + 6) / 6. The same number can be written as a sum of combinations: g(n) = C(n,0) + C(n,1) + C(n,2) + C(n,3). For n = 10 that sum is 1 + 10 + 45 + 120, which gives 176 pieces. Small cases are easy to check against everyday intuition. With three planar cuts the maximum is g(3) = 8, and with five cuts it is g(5) = 26. By ten cuts the maximum reaches g(10) = 176.
The formula grows with the cube of n, so adding cuts pays off quickly at first and then the gains get larger in absolute terms. Each new plane can be positioned so that it meets all the planes before it, and the pattern of those intersections determines how many new pieces appear. The cake number assumes ideal cuts: perfectly flat planes, no thickness to the blade, and every cut chosen to maximize the result. Real cake and a real knife will not match the formula exactly, but the number still describes the best possible outcome for a given count of planar cuts.
Worked values
A cake number calculator is easiest to trust when you can check its answers by hand. The cake number g(n) is the maximum number of pieces a solid cake can be divided into with n planar cuts. For the values below, we work each one two ways: with the closed form g(n) = (n^3 + 5n + 6) / 6, and with the equivalent binomial sum g(n) = C(n,0) + C(n,1) + C(n,2) + C(n,3). Both routes should land on the same number every time.
Start with n = 3. The closed form gives (3^3 + 5 × 3 + 6) / 6. Since 3^3 = 27 and 5 × 3 = 15, the numerator is 27 + 15 + 6 = 48, and 48 / 6 = 8. The binomial sum gives C(3,0) + C(3,1) + C(3,2) + C(3,3) = 1 + 3 + 3 + 1 = 8. So g(3) = 8, and the two methods agree.
Next, n = 5. The closed form gives (5^3 + 5 × 5 + 6) / 6. Since 5^3 = 125 and 5 × 5 = 25, the numerator is 125 + 25 + 6 = 156, and 156 / 6 = 26. The binomial sum gives C(5,0) + C(5,1) + C(5,2) + C(5,3) = 1 + 5 + 10 + 10 = 26. So g(5) = 26, again matching on both sides.
Finally, n = 10. The closed form gives (10^3 + 5 × 10 + 6) / 6. Since 10^3 = 1000 and 5 × 10 = 50, the numerator is 1000 + 50 + 6 = 1056, and 1056 / 6 = 176. The binomial sum gives C(10,0) + C(10,1) + C(10,2) + C(10,3), which is 1 + 10 + 45 + 120 = 176. So g(10) = 176, and the two methods agree here as well.
These three checks cover a small case, a middle case and a larger case, so they are a useful test of any cake number calculator you use. If a tool returns 8 for three cuts, 26 for five cuts and 176 for ten cuts, it is reproducing the standard values. The cake number is the three-dimensional analogue of the lazy caterer's sequence, which describes the same kind of maximum-piece problem in two dimensions.
| n (cuts) | Closed form (n^3 + 5n + 6) / 6 | Binomial sum C(n,0) + C(n,1) + C(n,2) + C(n,3) | g(n) |
|---|---|---|---|
| 3 | (27 + 15 + 6) / 6 = 48 / 6 | 1 + 3 + 3 + 1 = 8 | 8 |
| 5 | (125 + 25 + 6) / 6 = 156 / 6 | 1 + 5 + 10 + 10 = 26 | 26 |
| 10 | (1000 + 50 + 6) / 6 = 1056 / 6 | 1 + 10 + 45 + 120 = 176 | 176 |
Why only four binomial terms?
The binomial sum for the cake number runs from C(n,0) through C(n,3) and then stops. That cutoff is not an arbitrary convenience—it follows from the geometry of a flat cut. A plane is two-dimensional, so when a new planar cut slices through the cake, the most it can do on that plane is carve it into regions the way lines carve a flat surface. The maximum number of regions a plane can be divided into by n lines is the lazy caterer's number, and that number is exactly C(n,0) + C(n,1) + C(n,2). The cake number is the three-dimensional analogue of the lazy caterer's sequence, and this is where the two meet.
Here is why that matters for a cake number calculator. Each new cut adds pieces only where it passes through existing pieces, and the pattern of those intersections lives on the cutting plane itself. The plane can be split into at most a lazy-caterer number of regions, so the new cut can add at most that many new pieces. Summing that contribution over all n cuts is what produces the binomial expression g(n) = C(n,0) + C(n,1) + C(n,2) + C(n,3). The first three terms count the regions on the plane; the fourth term, C(n,3), is the extra layer that three-dimensional stacking allows. There is no C(n,4) term because a plane has only two dimensions to work with, so the sum is truncated at C(n,3).
The closed form g(n) = (n^3 + 5n + 6) / 6 is the same statement written as a polynomial. Because the binomial sum stops at C(n,3), the result is cubic in n—one degree for each dimension the cuts can exploit, plus the constant term for the whole cake. Checking small cases shows the formula behaving as expected: g(3) = 8, g(5) = 26 and g(10) = 176. For n = 10 the binomial form reads 1 + 10 + 45 + 120, which sums to 176, matching the closed form exactly.
This truncation is also a useful sanity check when you use a cake number calculator. If a tool ever produced a term beyond C(n,3), it would be claiming that a flat cut can divide space in a way a plane cannot support. The four-term sum is the ceiling, and the lazy-caterer connection explains why the ceiling sits where it does.
- A plane is two-dimensional, so a new cut can be split into at most a lazy-caterer number of regions.
- That caps the binomial sum at C(n,0) + C(n,1) + C(n,2) + C(n,3).
- The closed form g(n) = (n^3 + 5n + 6) / 6 is cubic for the same reason.
- For n = 10: 1 + 10 + 45 + 120 = 176, matching g(10) = 176.
Cake numbers and higher dimensions
The cake number counts something concrete: the most pieces you can get from a solid cake using n flat, planar cuts. What makes the sequence interesting is that the same counting idea keeps working when you change the number of dimensions. The cake number is the three-dimensional analogue of the lazy caterer's sequence, which asks the same question for a flat pancake cut by straight lines. Raise the dimension again and you get the four-dimensional version, and so on without limit.
In dimension d, the maximum number of pieces is the sum of the first d + 1 binomial coefficients. For the familiar three-dimensional cake, that means adding four terms: C(n,0) + C(n,1) + C(n,2) + C(n,3). Each term has a job. C(n,0) is always 1, the whole cake before any cut. C(n,1) adds the cuts themselves. C(n,2) and C(n,3) account for the new regions created where cuts meet each other and where they meet in three-dimensional space. For n = 10 the sum reads 1 + 10 + 45 + 120, which totals 176, matching the closed form g(n) = (n^3 + 5n + 6) / 6.
The pattern is easiest to see in the small cases. With three cuts, g(3) = 8: the sum is 1 + 3 + 3 + 1, the fourth row of Pascal's triangle. With five cuts, g(5) = 26. The binomial view also explains why the growth is cubic rather than exponential — you are adding a fixed number of terms, and the largest, C(n,3), grows like n cubed divided by 6. A cake number calculator simply evaluates that sum for whatever n you enter, so you do not have to work through the binomial coefficients by hand.
The same recipe generalizes cleanly. In one dimension, the sum stops after two terms and you are counting intervals on a line. In two dimensions, it stops after three terms and you are counting regions of a plane, the lazy caterer's sequence. In three dimensions, it stops after four terms and you have the cake number. In four dimensions, you add C(n,4), and each additional dimension contributes one more binomial coefficient to the total.
What stays constant across all these dimensions is the logic of the maximum: each new cut is placed so that it intersects every previous cut in the richest possible way, and the count of new pieces equals the number of regions the cut is divided into. That recursive idea is what produces the binomial sum, and it is why the cake number sits naturally in a family of sequences rather than standing alone.
- 1D: sum of the first 2 binomial coefficients — intervals on a line
- 2D: sum of the first 3 — the lazy caterer's sequence for a flat pancake
- 3D: sum of the first 4 — the cake number, g(n) = C(n,0) + C(n,1) + C(n,2) + C(n,3)
- 4D and beyond: add one more binomial coefficient per dimension
FAQs
What is the cake number for 10 cuts?
With 10 cuts, the cake number is 176 pieces at most. This comes from (1000 + 50 + 6) / 6, where 1000 is 10 cubed, 50 is 5 times 10, and 6 is the constant term. So ten well-placed planar cuts can divide a solid cake into no more than 176 pieces.
What is the formula for the cake number?
The cake number is g(n) = (n^3 + 5n + 6) / 6. It can also be written as the sum C(n,0) + C(n,1) + C(n,2) + C(n,3). The cubic term explains why the count grows quickly as you add cuts, compared with flat-disc problems that grow only quadratically.
How many pieces can 3 cuts make?
Three cuts can make 8 pieces. This is the familiar result that three well-placed cuts divide a cake into eight pieces. Each cut is a flat plane through the solid, and arranging them so every new plane meets all earlier ones gives the maximum of 8.
How many pieces can 5 cuts make?
Five cuts can make 26 pieces at most. That is the cake number for n = 5, meaning five well-placed planar cuts through a solid cake. Fewer pieces result if the cuts are not arranged to intersect as many earlier cuts as possible.
How is the cake number different from the lazy caterer?
The lazy caterer cuts a flat disc with lines, while the cake number cuts a solid with planes. Because the cake number works in three dimensions, its growth is cubic, not quadratic. That extra dimension is why the cake number rises much faster as you add cuts than the lazy caterer sequence does.
What does C(n, 3) contribute?
For n = 10, C(n,3) contributes 120 of the 176 pieces. That is the genuinely three-dimensional part of the count, coming from choosing three of the ten cuts. The remaining pieces come from the lower-order terms C(n,0), C(n,1), and C(n,2).