Show the formula and working
This garden sleeper calculator works out how many sleepers you need to build a raised bed, planter or edging, layer by layer. Enter the bed length, width and height, and the size of your sleepers, and it counts the full length sleepers, works out which shorter pieces can be cut from the same sleeper, and shows the total and the cost. Reusing offcuts often saves two or three sleepers on a typical bed.
Quick answer: To work out how many sleepers you need, divide the bed height by the sleeper height to get the number of layers, then count the sleepers for each side of each layer. A 2.4 m by 1.2 m bed, two 20 cm layers high, needs 4 full sleepers for the long sides and 2 more cut in half for the short sides: 6 sleepers.

What Is a Garden Sleeper Calculator?
A garden sleeper calculator is a tool that converts the size of a raised bed into the number of timber sleepers to buy, allowing for how many layers are stacked and how pieces are cut.
The formula in plain words: layers equal the bed height divided by the height of one sleeper on edge, rounded up. For each side of each layer, the calculator counts whole sleepers, then lists the shorter pieces needed to finish each side. Those pieces are packed into whole sleepers, longest first, so two 1.2 m pieces come from one 2.4 m sleeper. Full sleepers plus sleepers used for pieces give the total.
How Do You Use the Garden Sleeper Calculator?
- Enter the length and width of the bed.
- Enter the height you want the bed to be.
- Enter your sleeper length and height.
- Add the price per sleeper if you want the cost.
- Read the sleepers needed, layers and cut pieces.





How Many Sleepers Do You Need for a Raised Bed?
A common 2.4 m by 1.2 m bed needs 3 sleepers for each 20 cm layer when the short sides are cut from one sleeper, so 6 sleepers for 40 cm and 9 for 60 cm.
| Bed size | Height | Layers | Sleepers reusing offcuts | Without reusing offcuts |
|---|---|---|---|---|
| 2.4 m x 1.2 m | 20 cm | 1 | 3 | 4 |
| 2.4 m x 1.2 m | 40 cm | 2 | 6 | 8 |
| 2.4 m x 1.2 m | 60 cm | 3 | 9 | 12 |
| 3 m x 1.5 m | 40 cm | 2 | 8 | 12 |
| 4.8 m x 1.2 m | 60 cm | 3 | 15 | 18 |

Designing a bed around the sleeper length is the easiest saving. A bed that is a whole number of sleepers long, with short sides that divide a sleeper evenly, leaves almost no waste. A 3 m by 1.5 m bed wastes far more than a 2.4 m by 1.2 m bed of similar size.
How Do Sleepers Fit Together at the Corners?
At each corner one sleeper butts against the end of the other, so either the long or short sides end up shorter inside by the thickness of the sleeper.
This calculator measures along the outside of each side. If you need exact inside dimensions, add the sleeper thickness to the length or width. Stagger the corners from layer to layer like brickwork so the bed is stronger, and fix layers together with long timber screws or brackets, following the supplier’s advice.
Which Sleepers Should You Use?
New softwood sleepers that are pressure treated for ground contact are a popular choice for vegetable beds, while hardwood sleepers last longer but cost more.
Old railway sleepers can be treated with creosote, which is not suitable where food is grown, so many growers avoid them for vegetable beds. Ask the supplier how the timber is treated. To fill the finished bed, the raised bed soil calculator works out the topsoil and compost. For edging a deck, see the decking calculator.
For building tips, the RHS has a guide on how to make a raised bed.
Worked Example: A Long Vegetable Bed
Example: a grower plans a 4.8 m by 1.2 m bed, 60 cm high, using 2.4 m sleepers that are 20 cm high on edge, at £28 each (an example price).
- Layers: 60 / 20 = 3
- Long sides: 4.8 m is two full sleepers, so 2 x 2 sides x 3 layers = 12 sleepers
- Short sides: 6 pieces of 1.2 m, cut two from each sleeper, so 3 sleepers
- Total: 15 sleepers, or 18 if each short side used a whole sleeper
- Cost: 15 x £28 = £420, saving £84

At 60 cm high the grower adds internal corner posts and checks the bed is not holding back a slope, because taller retaining walls need proper design. A practical tip: cut all the short pieces before you start, so each layer goes together quickly and square.
Garden Sleeper Calculator FAQs
How many sleepers do I need for a 2.4 m by 1.2 m raised bed?
For one layer you need 3 sleepers: two for the long sides and one cut in half for the short sides. For two layers you need 6, and for three layers 9.
How long are garden sleepers?
Many garden sleepers are 2.4 m long, but other lengths are sold. Enter the length from your supplier in the calculator.
How high should a sleeper raised bed be?
Two layers, about 40 cm, suit most vegetables. Higher beds are easier to reach from a seat but need more soil and stronger construction.
How do you fix garden sleepers together?
Long timber screws through the sleepers at the corners, or metal brackets, are common. Stagger the joints between layers for strength.
Do I need to line a sleeper raised bed?
Some growers line the inside walls with a permeable membrane to protect the timber. Avoid lining the base, so the bed drains freely.
Can I use old railway sleepers for vegetables?
Many growers avoid old railway sleepers for food crops because they may be treated with creosote. New sleepers treated for ground contact are a common alternative.
Checked October 2026. Sources: supplier product information for sleeper sizes and treatments.