# Wall Panelling Calculator

This week my girlfriend has decided she wants wall panelling. I’m not much of a DIY man, but give me 10 minutes, a YouTube video and a cup of coffee and I’ll become an expert in any domain.

Important note: if you’re about to embark on this journey, don’t use nails, it’ll take you 10x as long having to fill/sand/paint. Glue it to the wall, I’ve used this glue for subsequent walls and it works a treat!

## Wall panelling

Wall panelling seems to be the craze right now, you wouldn’t see an empty wall on an influencers Instagram that’s for sure. It’s simply planks of MDF nailed or glued to the wall and then painted to give the appearance of a panelled wall.

There were a few things that I needed to figure out to get this panelling right.

• How do I determine the distance between each panel, ensuring it’s equidistant and there’s a panel on the left-most and right-most part of the wall?
• How many panels should I have on the wall?
• What about my plug socket? If I find the optimum number of panels, what if one of the panels has to go through the plug socket? I really can’t be arsed with moving the socket.

To play around with these numbers, I decided to create a tool to do just that:

I wrote the program using p5.js, in the p5.js editor.

## How to use the calculator

The calculator uses CMs, so measure your wall’s height/width as well as the skirting board. Then find the height/width of your panels and pop them into the calculator. Then it’s just a case of playing around with the panel count to see which looks the best.

### Obstructions

If you have an obstruction such as a plug, toggle “Show obstruction”. Then specify the distance from the left wall and the distance from the ceiling. Then choose the width/height of the obstruction.

## The maths

First of all, we need to figure out how many gaps there are, the gap is the bit between two planks of wood:

This is just the number of planks – 1. So there are 5 gaps above because there are 6 planks.

``gap = planks - 1``

Next, we need to calculate the gap between each panel, whilst still ensuring we have a panel on either end of the wall.

``spacingWidth = (wallWidth / gaps) - panelWidth / gaps;``

This will give us this:

And to calculate the gap width, all you need to do is take away the width of a panel.

``gapWidth = spacingWidth - panelWidth``

Hopefully, other people can make use out of the calculator, it’s definitely made my life easier. If this blog helped you out then maybe you could benefit from my Wall Paint Calculator, after all, you’re probably gonna need to do some painting now aren’t you? ðŸ˜‰

I hope you enjoyed this blog, donâ€™t forget to sign up to the newsletter â€“ Be the first to hear when we release new content, participate in weekly coding challenges, listen to more of my drivelling.

1. […] on from the success of my Wall Panelling Calculator which has now been used by 1000s of budding carpenters, I thought I’d have a crack at a wall […]

2. Gail Douglas says:

Thanks so much for the calculator, so easy to see and visualise. Now just down to my own diy skill to see how it turns out!

3. Tom says:

For some reason it missed off the end panel (batten). For example 264 cm width, 6.9cm battens, 5 gaps, 6 panels however the output of 45.6cm adds up to 5×45.5=227.5 246-227.5=36.5cm / 6 = 6cm batten where as with my wood at 6.9cm I actually only get in 5 panels (perfectly I should say). Great tool and helpful but I wonder how I went wrong?

• Hi Tom thank you for your comment you highlighted a bug with the code, unfortunately, it wasn’t parsing the decimal value correctly for your example. Hopefully now if you plug in your numbers again you should get the value you expect for the gaps. I’m really sorry about this, quite embarrassing on my behalf, I hope your wall is looking good!

• Tom says:

Quick response, itâ€™s going well all primed from my afternoons work, just deciding whether to squeeze one in or leave it be. Appreciate the tool