Magnetic field gradients play a fundamental role in fast magnetic resonance imaging (MRI) methods and spectroscopy imaging. Precise information on gradient waveform shape and rise times is often very useful in experimental MRI. We present a simple method for the measurement of the gradient time course and static magnetic field changes. The method does not require any specialized hardware and can be used with a standard volume coil and a special phantom filled with deionized or doped water. The method is based on an analysis of the instantaneous frequency variation of an MR signal in the time domain, acquired from a mechanically selected thin slice of phantom located at the gradient isocentre. The measurement and approximation of the course of time gradients and of the changes in the static magnetic field result in pre-emphasis constants that substitute the constants determined manually in a time-consuming manner. The described method facilitates the determination of pre-emphasis constants for the compensation of eddy current effects in MR systems. Our results show that residual gradients in the region of interest within 0.5 ms after the gradient is switched off are smaller than 5 µT m−1 (for an applied test gradient of 72 mT m−1) and the shift of the static field is smaller than 0.2 µT. This accuracy is very important for the development of MR spectroscopic imaging technologies using samples with very short relaxation times, and for EPI pulse sequences.