How to do it
Leaving room for adjustment
The rough opening is taller and wider than the assembled door jambs to allow space for the jambs plus a little extra for shimming the assembly should the opening not be exactly plumb or square.
A typical residential door is 32 inches wide and 80 inches tall, so the rough opening is 34 inches wide and 82 inches tall. Rather than rely on these dimensions, however, purchase (or at least measure) the door you will be installing before framing the opening. If you are in doubt about how big to make the opening, make it 1/4 inch on the larger side. You can always shim a too-small door to fit, but a door that is too big for its opening is a nuisance to cut down.
Make and Install Header
Get an Extra Set of Hands
When you are trying to tap a wall into position and get it plumb, it can be awkward to hold a level at the same time. Clamp a level to the side of one of the studs for hands-free viewing.