Do you make your own croissants or other flaky pastries? I’m usually more of a dump-and-stir baker, but I’m considering giving it a try. First, I thought it would be useful to understand the math of laminated dough.
To create layers in pastry dough, the initial step is encasing a chilled butter block (the beurrage) inside the dough (the détrempe). This step is called “locking in” the butter. The dough is then rolled out and folded multiple times to create additional layers. This process is called “lamination.” During baking, the butter layers melt and produce steam, which puffs and separates the dough layers, resulting in flaky pastries like croissants and pain au chocolat.
I created the interactive Pastry Lamination Calculator to evaluate different fold combinations and see the resulting number of layers. By using the calculator and making decisions ahead of time, I can spend less time handling the dough and reduce the risk of warming the chilled butter.
In[]:=
ResourceData["Demonstration: Pastry Lamination Calculator"]
Out[]=
​
pastry lamination calculator
lock-in fold method
envelope
single
letter
book
subsequent letter folds
subsequent book folds
subsequent folds
letter: 0, book: 0
total layers
5
butter layers: 2
dough layers: 3

Lock-in folds

There are four types of initial folds to lock in the chilled butter: envelope, single, letter and book.

Envelope

For an envelope lock-in fold, place the square butter block diagonally in the center of a rolled-out square of dough. Each corner of the butter points to the midpoint of a dough edge. Fold the corners of the dough over the butter envelope-style, so that they meet in the center. This method creates three starting layers (dough-butter-dough).

Single

For a single lock-in fold (also known as the two-fold or French lock-in method), place the square butter block in the middle of a rolled-out rectangle of dough. Fold the exposed dough over the butter from both sides and seal the dough edges together in the middle. This method creates three starting layers.

Letter

For a letter lock-in fold (also known as the three-fold or English lock-in method), cover two-thirds of the rectangular dough with the butter block, fold the exposed dough over to cover half of the butter, then fold in half, like folding a letter. This method creates five starting layers (dough-butter-dough-butter-dough).

Book

For a book lock-in fold (also known as the four-fold), cover half of the rectangular dough with the butter block placed in the center, fold the exposed dough over the butter from both sides, then fold in half as if closing a book. This method creates five starting layers.

Subsequent folds

After the lock-in fold, subsequent folds are letter or book folds. When calculating total layers, dough layers are always one greater than butter layers.

Croissants

The type and number of folds for a croissant is a matter of chef’s preference. Fewer folds can produce an open, airy structure and distinct layers. The butter layers are thicker, which can enhance the rich buttery taste. If the dough is rolled out and folded too many times, the butter may become too thin to produce adequate steam for separating and puffing up the dough layers. However, more layers can create a tighter spiral in the croissant and a crispier, flakier texture.
Model the folds for a traditional croissant by starting with a single lock-in fold, followed by three letter folds (rotating and rolling out the dough between each fold):
The result is a flaky croissant with 27 butter layers and 55 total layers.

Puff pastry

Golden, crispy puff pastry (pâte feuilletée) can be the star ingredient of sweet and savory tarts, fruit turnovers, salmon en croûte and beef Wellington. Puff pastry will have hundreds of butter and dough layers. The French mille-feuille literally translates to “thousand leaves” due to its many layers.
A classic puff pastry may have up to six subsequent folds after the lock-in fold:
This high number of subsequent folds creates more than 700 layers each of butter and dough.

How to access the calculator

You can reach the Pastry Lamination Calculator through the Wolfram Demonstrations Project resource page at https://demonstrations.wolfram.com/PastryLaminationCalculator/
You also can retrieve the calculator using ResourceData:
In[]:=
ResourceData["Demonstration: Pastry Lamination Calculator"]
Out[]=
​
pastry lamination calculator
lock-in fold method
envelope
single
letter
book
subsequent letter folds
subsequent book folds
subsequent folds
letter: 0, book: 0
total layers
5
butter layers: 2
dough layers: 3
Wishing you flaky layers and happy baking!

CITE THIS NOTEBOOK

Pastry math: calculating layers in laminated dough​
by Gay Wilson​
Wolfram Community, STAFF PICKS, December 23, 2025
​https://community.wolfram.com/groups/-/m/t/3595159