Summarize this article:

Start by sawing a 2x4 board into 2 pieces that are the same width as your desktop, minus the width of the two legs that will go on either side. These pieces will serve as supports to brace the desk from beneath. Once you’ve done this, cut your remaining wood into 4 identical legs. Their length should correspond to the desired height of your desk, minus the width of the boards making up the desktop.  Note that 2x4 boards are actually only 1.5 inches (3.8 cm) thick, not a full 2 inches (5.1 cm). This means that if your desktop is 24 inches (61 cm) wide, each of your support pieces will need to be 21 inches (53 cm) to allow enough room for a leg on either side. Similarly, you’ll need to subtract 1.5 inches (3.8 cm) from your initial table leg measurements to reflect the thickness of the desktop—you want your desk to sit 28 inches (71 cm) off of the ground, for example, each of your legs will need to be 26.5 inches (67 cm) long. Paint or stain your table legs to match your desktop, or leave them unfinished to provide some visual contrast. You can find premade desk and table legs at most hardware stores and home improvement centers, as well as certain specialty furniture stores like IKEA. They’re available in a variety of lengths, shapes, and materials, which means you’re sure to find the perfect set to complete the style of desk you’ve envisioned. Metal legs, for instance, could give a lightly-stained wooden desk a sleek, minimalistic modern air, while square frames can keep the underside of a desk from looking so open without sacrificing valuable storage space. Keep in mind that you’re not limited to simple 2x4 or premade legs. You might also turn a few old wooden pedestals into one-of-a-kind decorative stands to lend your desk added personality, or even just secure your desktop to a pair of sawhorses for a clever, no-fuss solution. The possibilities are virtually endless!  Think outside the box and keep your eyes peeled for interesting materials and objects that you think might make good legs for a homemade desk. Examples of other unusual items you could utilize as legs include plywood sheeting, bamboo, industrial pipe, telescopic metal poles, or even modified wooden crates or pallets. To fasten legs cut from 2x4 boards, drill 2 screws through the outer edge of each leg and into the end of the central support piece on each side of the desk. Then, sink another screw every 7 inches (18 cm) along the length of the support. Jostle your desk gently when you’re finished to confirm that it’s stable.  Store-bought desk legs typically have screw holes molded into the ends to make the assembly process a cinch. You may need to get creative when it comes to putting on legs made from converted or salvaged materials, depending on the general shape and configuration of the pieces.

Summary:
Cut your own custom desk legs using 2x4 boards. Purchase premade desk legs to give your desk a more polished look. Use other items as improvised legs for a thrifty and unique approach. Attach your desk legs to the bottom of your desktop using wood screws.