Image quality of CT scans suffers when objects undergo motion. Respiratory motion causes artifacts, which prevents adequate visualization of anatomy. Four-dimensional CT (4D-CT) is a method in which image reconstruction of moving objects is retrospectively gated according to the recorded phase information of the monitored motion pattern. Although several groups have investigated the use of 4D-CT in radiotherapy, little has been detailed with regard to the sorting method. We present a new retrospective gating technique with sorting based on the amplitude of the motion trace. This method is compared to previously developed methods that sort based on phase. A 16-slice CT scanner (Sensation 16, Siemens Medical Solutions, Erlangen, Germany) was used to acquire images of two phantoms on a motion platform moving in two dimensions. The motion was monitored using a strain gauge inserted inside an adjustable belt. A 180 degrees interpolation was used for reconstruction after gating. Significant improvement using the amplitude-sorting technique was observed, particularly when testing nonperiodic motion functions.