Saw two 75-inch-long side rails and two 40-inch-long end rails out of 2-by-8-inch lumber. This is made to fit a twin mattress, the average size of a loft bed. If your mattress is a different size, cut the side rails to the length of your mattress, and add 3-1/2 or 4 inches. Cut the end rails just slightly larger than the mattress’ width.
Divide two 2-by-2-by-96-inch lumber boards into two slat support rails measuring the inside length of the bed frame. This is equal to 3 inches less than the total length of the side rails.
Cut at least 6 slats equal to the length of the end rails, two ladder side rails, and 5 ladder rungs out of 2-by-4-inch lumber boards.
Cut 4-by-4-inch lumber into 4 legs that measure the height of the bed.
Assemble the side rails and end rails into a rectangular frame, with the end rails between the side rails, and secure each joint with five 3-inch screws.
Screw the slat support rails into the inside of the bed frame, leaving 3 inches above them and 2 inches below.
Apply wood glue to the top of the supports and slide the slats into place.
Cut about 1-1/2 inches into each leg, about 7-1/2 inches down, so that the legs fit against the end sides of the frame.
Stand up the bed atop the ledge cut out of the legs and screw a 5/8-inch hole clear through both the outer part of the legs and the bottom 2 inches of the bed frame. Secure them with a 4-inch bolt and a matching nut.
Build a ladder by screwing the rungs between the two ladder rails and fix it to the bed using 1-inch nails and corner brackets on both sides of the ladder.
Cut 2-by-4-inch lumber into 1 piece that measures the length of the bed between the legs, and 1 piece that measures the desired width of the desk.
Make a “T” shape out of the two pieces, attaching the shorter one in the middle of the longer one using a 6-inch lag screw. Screw the “T” into the wall-side legs of the bed using 2 screws on either side to prevent it from turning.
Cut a piece of 3/4-inch plywood to use as a desktop. Sand all edges, apply wood glue and press a wood laminate down on it. Trim the excess laminate using a router, and apply laminate to the side edges. Trim using a router.