The Mathematics of Tetris Stacking

Tetris looks like a reflex game and turns out to be a tightly-constrained tiling problem. The mathematics of Tetris stacking — the bag randomizer probabilities that govern piece distribution, the downstack arithmetic that decides whether a board recovers, the proof that infinite play is impossible against an adversarial sequence — is what separates the leaderboard from the casual player. The math is what makes the modern Tetris meta possible.
Key takeaways
- Modern Tetris uses a “7-bag” randomizer that guarantees each of the seven tetrominoes appears once per seven pieces.
- The bag system is deterministic per-bag, but bag order and piece order within a bag are random.
- Brzustowski’s 1992 paper proved infinite Tetris is impossible against worst-case piece sequences.
- Downstack rate (lines cleared per piece placed) determines whether a stack recovers under garbage pressure.
- The S/Z piece distribution creates the famous “S/Z drought” that punishes flat-bottom stacking.
The seven tetrominoes
Tetris has seven distinct piece shapes, named after letters they resemble: I, O, T, L, J, S, Z. Each piece is a tetromino — four squares connected edge-to-edge. There are exactly five free tetrominoes (counting reflections), but Tetris distinguishes L/J and S/Z as separate pieces because the game’s piece rotation system doesn’t fold them onto each other.
The seven tetrominoes are the entire palette. Every Tetris stack, every line clear, every Tetris (a four-line clear) is built from sequences of those seven shapes.
The 7-bag randomizer
Modern Tetris (since the Tetris Guidelines published around 2001) uses the “7-bag” randomizer. The game shuffles all seven pieces into a bag, deals them out one at a time, then shuffles a new bag and continues.
The math: within any 7 consecutive pieces, you see each piece exactly once. The longest possible drought of a single piece is 12 pieces (the piece appears at position 1 of one bag and position 7 of the next, with all other positions filled by the other six pieces). The shortest possible interval is 2 pieces (last of one bag, first of the next).
This is a huge change from the original Game Boy Tetris randomizer, which was pseudo-random with no per-piece guarantee. Players could go 20+ pieces without an I-piece on a bad seed.
I-piece economy
The I-piece is the only one that can clear four lines at once (a Tetris). At competitive levels, players try to score Tetrises rather than singles, doubles, or triples because four-line clears are worth 800 points (or scoring multipliers depending on game version) versus 100/300/500 for fewer-line clears.
The bag math: you’re guaranteed one I-piece every 7 pieces. To build a Tetris-ready stack, you need to hold I-pieces for the right moment — usually by holding a column open for a vertical I-piece drop while filling the other 9 columns to height 4.
The skill is reading the next-piece queue (most modern Tetris games show 5-6 pieces ahead) and timing the I-piece arrival with the well being ready.
S/Z droughts and flat-bottom stacking
S and Z pieces are the awkward ones. They don’t sit flat. They create height differences that compound across a stack unless deliberately accommodated.
The bag math: you’ll see exactly one S and one Z per bag. They arrive at unpredictable positions, but they always arrive. A bad sequence can give you S then Z back-to-back, which on a flat-bottom stack creates a 2-tall ridge that breaks your line-clear setup.
The defense: don’t build flat. Strong players intentionally create a “well” column (usually on the right or left edge) where vertical I-pieces drop for Tetrises, and stagger their stack height in the other 9 columns to absorb S/Z pieces without disruption.
Brzustowski’s theorem
John Brzustowski proved in 1992 that Tetris is mathematically losable: there exists an infinite sequence of pieces that no human or AI strategy can survive indefinitely. The proof works by constructing an adversarial sequence of alternating S and Z pieces that force the stack to grow without recoverable line clears.
The theorem doesn’t apply to the modern 7-bag randomizer (which can’t produce arbitrarily long S/Z sequences), but it applies to any randomizer that can produce truly random piece sequences. The 7-bag’s deterministic constraint is part of what makes modern Tetris technically survivable for arbitrarily long runs — but only in expectation, not in worst case.
Downstack rate
Downstack rate is the lines cleared per piece placed. A pure Tetris strategy (only 4-line clears, no singles or doubles) has a downstack rate of 4/10 = 0.4 lines per piece. A pure single-line strategy has a downstack rate of 1/4 = 0.25 lines per piece.
In garbage-modes (Tetris versus, where you receive incoming garbage lines from opponents), the question is whether your downstack rate exceeds the incoming garbage rate. If you’re receiving 0.5 lines of garbage per second and clearing 0.4 lines per second, you lose. If you’re clearing 0.6 lines per second, you survive.
This is why pro-level versus play is dominated by T-spins and other high-multiplier line clears: they boost downstack rate beyond what a pure Tetris strategy achieves.
T-spins and the modern meta
A T-spin is a T-piece rotation that lands the piece in a slot it couldn’t have reached by simple translation. T-spin single, double, and triple clears award bonus multipliers under the Tetris Guideline scoring system. T-spin double, for example, is worth 1,200 points versus a regular double’s 300.
The math advantage of T-spins is dramatic. A player who can set up reliable T-spin doubles has roughly double the scoring per piece of a pure-Tetris player. This is why modern competitive Tetris (Puyo Puyo Tetris, Tetris 99, TETR.IO) is dominated by T-spin builds.
Soda Tetris and “infinite” stacking
“Soda Tetris” is a community shorthand for impossible high-line marathon goals. The math of long Tetris marathons: even with perfect play, you eventually run into a piece sequence that forces a stack-up because the 7-bag can produce locally hostile sequences. Marathon mode records in Tetris Effect and Tetris Online run into the thousands of lines, but no human has played indefinitely.
The world record holder for Marathon mode in Tetris Effect (last public update) reached over 10,000 lines. Beyond that, the limit is sleep and concentration, not mathematics.
Hold piece math
The Hold mechanic lets you swap the current piece for the held piece. Strategic Hold use is what separates intermediate from advanced players.
The hold strategy: use Hold to bank an I-piece for Tetris setup. Use Hold to bank a T-piece for T-spin setup. Use Hold to dodge an S/Z that doesn’t fit your current stack.
A common amateur mistake is using Hold reactively (swap whatever’s bad). The correct use is proactive: identify the piece you’re waiting for, hold the current piece, and deploy both at optimal timing.
The 40-line sprint math
40-line sprint (clearing 40 lines as fast as possible) is the speedrun-style category. The math: you need 10 Tetrises to clear 40 lines, or some mix of singles/doubles/triples adding up to 40.
Pure-Tetris 40-line sprints are slower than mixed strategies because waiting for I-pieces and setting up the well costs time. The fastest 40-line runners use a mix of T-spin doubles and singles to maximize pieces-per-second throughput.
Top times are under 16 seconds. The world record (held by various players over the years on TETR.IO and Jstris) hovers around 14-15 seconds. For the deeper history of how Tetris randomization evolved, see our guide to Tetris randomizers and our history of Tetris.
Why the math matters at low levels too
Casual players benefit from a few math-derived rules:
- Don’t fill the rightmost column — keep it as a Tetris well.
- Use Hold proactively to bank I-pieces, not reactively for bad pieces.
- Stack with a slight slope rather than flat to absorb S and Z pieces.
- Read the next-piece queue. The bag guarantees future pieces — plan around them.
These four rules alone move most casual players from Marathon dying at 50 lines to surviving past 200.
Frequently asked questions
Is the 7-bag randomizer really random?
The order of pieces within a bag is random; the contents are deterministic. Every 7-piece sequence contains each tetromino exactly once. This guarantees no drought longer than 12 pieces for any single shape.
Can Tetris be played forever?
Not in the worst case. Brzustowski’s 1992 proof shows any truly random sequence can be forced to lose with adversarial S/Z patterns. The 7-bag randomizer prevents this in practice, so infinite expected play is possible — but no human has demonstrated it.
What’s the highest-scoring Tetris move?
A T-spin triple (1,600 base points) and a Tetris (800 base points) are the two highest single-clear multipliers. Back-to-back T-spin doubles or Tetrises add a B2B multiplier that can chain dramatically. Perfect clears (no blocks left on the board after a clear) award additional bonuses.
What’s the difference between Tetris and T-spin scoring?
A Tetris (4-line clear with an I-piece) is 800 points. A T-spin double (T-piece rotated into a 2-line clear) is 1,200. The T-spin’s higher per-clear scoring is why modern competitive Tetris emphasizes T-spin setups over pure I-piece play.
How long is the longest possible piece drought in modern Tetris?
12 pieces. With the 7-bag randomizer, a specific tetromino can appear at position 1 of one bag and position 7 of the next, with all other positions filled by the remaining six pieces. The minimum drought is 0 pieces (back-to-back).
The bottom line
The mathematics of Tetris stacking is bag-randomizer probability, downstack arithmetic, and T-spin multiplier math. The 7-bag guarantees you’ll see every piece, but it doesn’t guarantee good timing. Hold proactively, build a well, slope your stack against S/Z droughts. For a different falling-shape game that doesn’t require any of this math, the Chrome Dino game at the top of this page has cacti, not tetrominoes — and only one button.








