Frequency-based methods for measuring seismic attenuation are used commonly in exploration geophysics. To measure the spectrum of a nonstationary seismic signal, different methods are available, including transforms with time windows that are either fixed or systematically varying with the frequency being analyzed. We compare four time-frequency transforms and show that the choice of a fixed- or variable-window transform affects the robustness and accuracy of the resulting attenuation measurements. For fixed-window transforms, we use the short-time Fourier transform and Gabor transform. The S-transform and continuous wavelet transform are analyzed as the variable-length transforms. First we conduct a synthetic transmission experiment, and compare the frequency-dependent scattering attenuation to the theoretically predicted values. From this procedure, we find that variable-window transforms reduce the uncertainty and biasof the resulting attenuation estimate, specifically at the upper and lower ends of the signal bandwidth. Our second experiment measures attenuation from a zero-offset reflection synthetic using a linear regression of spectral ratios. Estimates for constant-Q attenuation obtained with the variable-window transforms depend less on the choice of regression bandwidth, resulting in a more precise attenuation estimate. These results are repeated in our analysis of surface seismic data, whereby we also find that the attenuation measurements made by variable-window transforms have a stronger match to their expected trend with offset. We conclude that time-frequency transforms with a systematically varying time window, such as the S-transform and continuous wavelet transform, allow for more robust estimates of seismic attenuation. Peaks and notches in the measured spectrum are reduced because the analyzed primary signal is better isolated from the coda, and because of high-frequency spectral smoothing implicit in the use of short-analysis windows.