Installing a Recessed Medicine Cabinet in Drywall

Recessed medicine cabinets sit flush with your wall and save valuable bathroom real estate compared to surface-mounted options. The key is getting the opening square and secured properly to studs—without that, you're left with a cabinet that wobbles or tilts. Done well, a recessed cabinet looks built-in, stays rock-solid, and holds your stuff without drama. Most bathrooms have enough wall space between studs to fit a standard 16-inch or 20-inch cabinet, though you'll need to verify your layout before cutting.

  1. Find the Studs First. Use a stud finder to locate the studs on both sides of your planned cabinet location. Mark the stud centers with a pencil. Measure the cabinet dimensions (width, height, depth) and verify you have at least 1.5 inches of clearance on each side of the cabinet frame to the stud. Mark the top, bottom, left, and right edges of your opening directly on the drywall using a level and pencil. Double-check that the opening is square by measuring corner-to-corner diagonals—they should be equal.
  2. Slice Clean, Not Fast. Put on your dust mask. Using a drywall saw (a keyhole saw works), start at one corner of your marked opening and cut slowly along the lines you've drawn. Stay just inside the pencil line so the cabinet frame will have something to grip. Take your time—rushing here leads to ragged edges and oversized holes. Once you've cut three sides, you can push the cut-out section inward and cut the fourth side, letting the piece fall into the wall cavity.
  3. Clear the Path First. If your opening intersects an electrical outlet or light fixture, you'll need to move it. Turn off the breaker for that outlet. Unscrew the outlet and carefully pull it out of the wall, leaving the wires intact. You can either cap the wires with a blank wall plate after the cabinet is installed, or reroute the outlet outside the cabinet opening (this requires running new wire and is better left to an electrician). For now, focus on clearing the path for your cabinet.
  4. Unpack Careful, Install Later. Remove your medicine cabinet from its packaging and set it upright on a clean work surface. Check the frame's mounting brackets or flanges (the parts that will attach to the studs). Most cabinets come with pre-drilled holes. If your cabinet has adjustable brackets, set them to accommodate your wall thickness—typically 1.5 inches for standard drywall over studs. Look for any shipping straps or protective tape and remove them. Don't install shelves or the mirror door yet—you'll do that after the cabinet is secured.
  5. Slide Flush, Then Level. With a helper holding the cabinet level, slide it into the drywall opening from inside to outside (the frame should sit flush with the face of the drywall). Use your level on the top of the cabinet to ensure it's perfectly horizontal. Check that it's centered in your opening with equal gaps on both sides. Have your helper hold it firmly in place. If you're working alone, temporarily tack the cabinet with one screw, check level, then add the remaining screws.
  6. Anchor Into Studs Only. Locate the mounting holes on the cabinet's frame flanges (top and bottom, or all four sides depending on your model). Using 2.5-inch wood screws and a power drill, screw through the frame into the studs on both sides of the opening. Drive at least two screws per side—four total minimum, six if your cabinet is wide. Tighten firmly but don't over-torque; you want the frame snug against the studs without cracking the frame. Check level again after each side is partially screwed.
  7. Check Four Sides, Not One. Once all screws are tight, use your level on all four sides—top, bottom, left edge, and right edge. The cabinet should be perfectly level and plumb. Open and close the door (if applicable) to ensure it swings smoothly without binding. If the door catches or the cabinet seems twisted, loosen a screw, adjust, and retighten. Take your time here; a crooked cabinet will bug you forever.
  8. Fill the Gaps Snug. You now have gaps between the cabinet frame's face and the surrounding drywall. Cut strips of drywall to fill these gaps (typically 1.5 to 3 inches wide, depending on the gaps). Score the back and snap them to size, or use a drywall saw. Fit these pieces around the frame and secure them with drywall screws every 6 inches, spaced about 1 inch from the frame edge. The goal is a continuous drywall surface around the cabinet perimeter.
  9. Thin Coats, Then Sand. Apply drywall joint tape over all seams where new drywall meets the frame or surrounding wall. Use drywall mud (joint compound) and a putty knife to embed the tape, then apply a first coat of mud about 6 inches wide. Let it dry (2–4 hours), then sand lightly and apply a second coat, extending it another 2–3 inches wider. After that dries, apply a final thin coat for a seamless finish. Sand between coats with 150-grit sandpaper.
  10. Prime First, Paint Twice. Once your mud is fully dry and sanded smooth, prime any bare drywall and mud with a drywall primer. This prevents blotchy paint coverage. Then paint the area with your bathroom wall paint. If the cabinet frame is trim or wood, paint it to match (or leave it natural, depending on your cabinet). Apply two coats of paint for even coverage. Mask off the cabinet opening with painter's tape before you paint if the cabinet door hasn't been installed yet.
  11. Shelves, Then Hinges. Once paint is fully dry, install the shelves (if they came separate) by setting them on the shelf supports inside the cabinet. Most cabinets have adjustable shelf pegs or clips—follow your manual. Hang the mirrored door by inserting the top hinge pin into the top frame bracket, then lifting the door until the bottom hinge aligns and slides into place. Check that the door closes smoothly and latches securely. Adjust the hinges if the door sits uneven.
  12. Seal and Trim Last. For a polished look, run a thin bead of paintable caulk around the perimeter where the cabinet frame meets the wall. Smooth it with a damp finger and let it dry. If your bathroom has trim around windows or doorways, install matching trim around the cabinet opening for continuity. Cut 45-degree angles at the corners and nail it in place with finishing nails, then fill the nail holes and paint.