Measure the width, height and depth of your computer. If your computer has multiple components, like a monitor and keyboard, place them on the floor the way they'll be placed in the box and measure the dimensions of the stack.
Purchase or use a box that allows for a minimum two inches of space on all sides of the box.
Insert a base of two inch cushioning and place your computer (and computer components, if applicable) into the box. Wrap the sides and top in two inches of cushioning and close the lid to ensure the box will accommodate the components without bulging.