I needed a bed on the cheap, and since my rented room has no closet I needed a way to hang up my clothes. Solution: loft bed!
I found 2x4s for free at my dad's work. They were going to toss them. Glad I got there first!
I used somewhere in the range of 40 2x4s to create this monstrosity, but many of them were shorter than the standard 8ft. You may need less or more depending on how tall you intend to make your bed.
I also found/purchased some add-ons for my bed:
1 closet rod
1 closet rod hanging kit
11 bolts with associated nuts and washers (we cut the ends flush after bolting the big sides together so length can vary)
a box of 2.5 inch deck screws
a box of 1.5 inch brass look screws (these were all donated by my dad so I'm guessing as to type).
2 pack of hooks to hang stuff on.