We present an improved signal processing algorithm for the max-min scanning method for phase determination in speckle and other interferometric techniques. After recording the intensity changes at one point on the image for a range of arbitrary phase shifts, curve fitting is employed to obtain the intensity waveform corresponding to this position. The phase value is derived from this curve, and the sign of the computed phase angle is determined using the derivative of the fitting curve. The phase map is obtained by performing the same procedure throughout the entire image. This improved algorithm requires neither sorting the recorded image signals nor additional sign images. Experimental examples are provided.