Lay painter's tape at the edge of the ceiling that meets the wall with the adhesive side against the wall and ceiling. Force the tape into the ceiling/wall edge with your fingers or paint stirrer's edge so that there is no space between the tape and the point where the ceiling and wall meet.
Paint the wall. Use strokes the entire length of the wall with a roller to paint the wall.
Paint the surface next to the tape with a small brush. While the paint is still wet, paint over that part of the wall with a smaller, 3-inch roller, to cover the brush marks.
Allow the paint to dry at least 24 hours before removing the tape.
Cut the tape in the corner of the wall and ceiling with a sharp utility knife. Peel the corner of the tape on the ceiling away from the ceiling's surface.
Pull the tape on the ceiling away from the corner at a 45-degree angle as you cut the tape until the entire length of tape fixed to the ceiling has been removed to reveal a straight and clean line of paint.