A simple method is presented for computing the gravity and magnetic profiles across two-dimensional bodies of arbitrary shape. The computer programme makes use of expressions for the attraction caused by an infinitely long sheet and it takes only a few seconds to compute a profile both for gravity and magnetic anomalies and their vertical and horizontal derivatives. Accuracy of the method is shown to be as good as that of graticules and owing to the use of simpler formulae, the method appears to be faster than the method of polygons.