This bed cost me about $22. The only thing I bought new was the 2" x 8"s. I got all the slats (the crosspieces that support the mattress), the bolts, the pegs that hold the headboard together, and the mattress for free. Scrounge on!
If you add fasteners to the mix, expect to spend another fifteen bucks or so.
You will need these tools:
Impact driver (or make do with your drill)
Ratchet and socket set
You will need these materials:
5 2" x 8" x 8' yellow pine boards, straight as possible
5 2" x 6" x 8' yellow pine boards, salvage preferable
8 1/2" x 4" galvanized lag bolts
32 1/4" x 4" galvanized lag bolts
1 1/2" x 3' dowel
Step 1: Framin'
So, the long sides are one inch longer than the mattress, and the short sides are four inches longer than the mattress, to accommodate both one inch of play on the mattress and one and a half inches on either side to overlap and create the joint with the long sides.
To reinforce the corners and create a spot for the legs to attach, I put a brace in each corner that was made from one of the leftover scraps of 2" x 8". Just cut the biggest right triangle you can out of the material. Make four of those.
Lay out the box on a level surface.