Removable Railing Table
My friend had a single 2x4 and wanted a laptop table for his deck railing, so here it is. Set your railing's cap and the top you want, and every cut, screw, and build step regenerates to fit it.
Contents 5 sections
I've been sharing my v1 progress building this site with my friend Sean, which triggered an idea for a project he needed. He's constantly using his laptop perched on his deck railing and wanted a simple table that would make things less... precarious. The catch was that he only had a single 2x4 in his garage.

So I came up with a simple, removable railing table that could be built from the 2x4 he had in the garage. Like everything on this site, the dimensions and plans are fully customizable in real time, and if your sizes won't fit on a single board, you'll see an error. So go ahead, try it for yourself!
Making use of a single 2x4
An 8-foot 2x4 is 96 inches, and that number is the hard constraint in this project. At the default size the top is four slats at 14 inches and two cleats below at 16, which is 88 inches of board. Account for the saw kerf and you have used a little under 89. That leaves about 7 inches of offcut.
Two cleats do the gripping
Nothing about this table attaches to the deck. No clamps, brackets, or screws into the railing. It's designed to be easy to remove or move when needed.
The two cleats that run underneath the top perform two jobs. They hold the top slats in place and provide security against the railing so the table can't be tipped off.
Fit to your railing, not mine
The default build fits a 2x6 cap, 5-1/2 inches, which is the most common. Yours might be something else, so be sure to measure and adjust the cap width when configuring the build.
The build won't let you configure something that won't fit on a single 2x4, so play around to get the maximum size for your use case.
Slats, not a slab
One 2x4 can't provide a solid top, so the design includes spaced slats. They're spaced evenly across the tabletop width, which leaves gaps that also help water drainage if you leave it out in the weather.
Each slat is drilled through and countersunk before assembly, so the heads finish flush and the screw pulls the slat down tight instead of splitting it. Splitting isn't usually a problem with soft lumber like 2x4s, so this step is optional, but still recommended for a clean look.
Make it yours
The default table is 16 inches along the rail and 14 across, which is enough for a laptop and a coffee. Yours depends on your railing and what you plan to put on it. Set the cap width you measured and the top you want, and the cut list, the screw count, and the step-by-step build come out matched to your deck, still out of one board.