A method for estimating sonic slowness in a subterranean formation comprising obtaining a plurality of sonic waveforms received by a plurality of receivers after emission of a source sonic wave by a transmitter through the subterranean formation to obtain a plurality of recorded sonic waveforms, the plurality of receivers located at different positions in the subterranean formation, obtaining at least two slowness models of the subterranean formation, a slowness model being defined by at least one cell of constant slowness for a plurality of wave energy modes; pre-processing each recorded sonic waveform of the plurality of recorded sonic waveforms to generate for each of said recorded sonic waveforms a plurality of pre-processed sonic waveforms, each pre-processed waveform being generated for a respective selected wave energy mode of the plurality of wave energy modes; computing (830, 840), for each of the at least two slowness models and using the corresponding slowness model, a set of candidate travel times, wherein each candidate travel time of a set of candidate travel times corresponds to a respective given wave energy mode and a position of a receiver of the plurality of receivers, computing, for each of the at least two slowness models, a plurality of relevance indicators corresponding to the set of candidate travel times by applying a waveform operator to each candidate travel time and the corresponding pre-processed sonic waveform; and computing a sonic slowness estimate for the subterranean formation from a set of candidate travel times of the slowness model for which the plurality of relevance indicators is optimum. obtaining a plurality of sonic waveforms received by a plurality of receivers after emission of a source sonic wave by a transmitter through the subterranean formation to obtain a plurality of recorded sonic waveforms, the plurality of receivers located at different positions in the subterranean formation, obtaining at least two slowness models of the subterranean formation, a slowness model being defined by at least one cell of constant slowness for a plurality of wave energy modes; pre-processing each recorded sonic waveform of the plurality of recorded sonic waveforms to generate for each of said recorded sonic waveforms a plurality of pre-processed sonic waveforms, each pre-processed waveform being generated for a respective selected wave energy mode of the plurality of wave energy modes; computing (830, 840), for each of the at least two slowness models and using the corresponding slowness model, a set of candidate travel times, wherein each candidate travel time of a set of candidate travel times corresponds to a respective given wave energy mode and a position of a receiver of the plurality of receivers, computing, for each of the at least two slowness models, a plurality of relevance indicators corresponding to the set of candidate travel times by applying a waveform operator to each candidate travel time and the corresponding pre-processed sonic waveform; and computing a sonic slowness estimate for the subterranean formation from a set of candidate travel times of the slowness model for which the plurality of relevance indicators is optimum.