The velocity-deviation log, which is calculated by combining the sonic log with the neutron-porosity or density log, provides a tool to obtain downhole information on the predominant pore type in carbonates. The log can be used to trace the downhole distribution of diagenetic processes and to estimate trends in permeability. Laboratory measurements on over 300 discrete carbonate samples reveal that sonic velocity is a function not only of total porosity, but also of the predominant pore type. In general, there is an inverse porosity-velocity correlation, but significant deviations occur from this relationship for certain pore types. Frame-forming pore types, such as moldic or intrafossil porosity, result in significantly higher velocity values at equal total porosities than do pore types that are not embedded in a rigid rock frame, such as interparticle porosity or microporosity. The results of the laboratory measurements can be applied to expand interpretations of standard wireline-log data, as shown in this study on two drill holes through Neogene carbonates from the Great Bahama Bank. The velocity-deviation log is calculated by first converting porosity-log data to a synthetic velocity log using a time-average equation. The difference between the real sonic log and the synthetic sonic log can then be plotted as a velocity-deviation log. Because deviations are the result of the variability of velocity at a certain porosity, the deviation log reflects the different rock-physical signatures of the different pore types. Positive velocity deviations mark zones where velocity is higher than expected from the porosity values, such as zones where frame-forming pore types dominate. Zero deviations show intervals where the rock lacks a rigid frame, such as in carbonates with high interparticle porosity or microporosity. Negative deviations mark zones in which sonic log velocities are unusually low, caused, for instance, by a cavernous bore-hole wall, fracturing, or possibly by a high content of free gas. By tracing the velocity deviations continuously downhole, one can identify diagenetic zones that are characterized by these different pore types. In addition, this method can be used to observe permeability trends because pore types influence the permeability of the rock.