Walsh transform of gravity anomalies over a point mass, a horizontal and a vertical line mass have been computed to obtain a cyclic shift invariant differential energy density (DED) function. Quantitative relations between DED spectral characteristics with depth to centroid/top of the source have been established. The effects of profile length, sampling interval, random noise and zero padding have been investigated. Applicability of the proposed method has been evaluated through two field examples. (C) 1998 Elsevier Science B.V. All rights reserved.