There is significant evidence that the anelastic loss of seismic energy is linked to petrophysical properties such as porosity, permeability and clay content. Thus, reliable estimation of anelastic attenuation from seismic data can lead to improved methods for the prediction of petrophysical properties. This paper is concerned with methods for the estimation of attenuation at sonic frequencies (5–30 KHz) from in situ data. Two independent methods have been developed and tested for estimating compressional‐wave attenuation from full‐waveform sonic data. A well‐established technique, the logarithm spectral ratio (LSR) method, is compared with a new technique, the instantaneous frequency (IF) method. The LSR method uses the whole spectrum of the seismic pulse whilst the IF method uses a carefully estimated value of instantaneous frequency which is representative of the centre frequency of the pulse. In the former case, attenuation estimation is based on the relative variation of amplitudes at different frequencies, whilst in the latter case it is based on the shift of the centre frequency of the pulse to lower values during anelastic wave propagation. The IF method does not assume frequency independence of Q which is a necessary assumption for the LSR method, and it provides a stable frequency log, the peak instantaneous frequency (PIF) log, which may be used as an indicator for attenuation under certain limitations. The development and implementation of the two methods is aimed at minimizing the effect of secondary arrivals, such as leaky modes, and involved a series of parameter tests. Testing of the two methods using full‐waveform sonic data of variable quality, obtained from a gas‐bearing sandstone reservoir, showed that the IF method is in general more stable and suitable for full‐waveform sonic data compared with the LSR method. This was evident especially in data sets with high background noise levels and wave‐interference effects. For good quality data, the two methods gave results that showed good agreement, whilst comparison with other log types further increased confidence in the results obtained. A significant decrease (approximately 5 KHz) in the PIF values was observed in the transition from an evaporite/shale sequence to the gas‐bearing sandstone. Average Q values of 54 and 51 were obtained using good quality data from a test region within the gas‐saturated sandstone reservoir, using the LSR and IF methods, respectively.