A technique is presented for compensating detector gain and offset variations that is applicable to both scanning and staring sensors. The method requires that the sensor line of sight be moved in a regular fashion over the scene to provide data for the compensation. The method does not depend on the scene characteristics. Equations describing the method and establishing its performance are presented. An implementation approach is described. The effects of scene dynamics are discussed.