The close relation between acoustic velocity and porosity makes it possible to use velocity logs to determine porosity. However, velocity or its reciprocal - travel time - also depends on other geological factors which, if known, permit more accurate log interpretation. The travel time-porosity relations for sandstones depends on geological factors such as the rock's age, composition, depth, tectonic history (compaction), shaliness, and type of fluid in its pores. Of these parameters, depth and shaliness are the most important. Travel time-porosity relations were computed by statistical methods, which took into consideration the variables mentioned. The resulting equations give more accurate porosity estimates than the time-average equation, which is in widespread use. Velocities of carbonate rocks are much less affected by depth than are those of the sandstones. On the other hand, mineralogical composition is of importance; pure dolomites show higher velocities, i.e., shorter travel times, than limestones of equal porosity. However, if the dolomites are impure, the porosity-travel time relation does not differ appreciably from that for limestone. The velocity log tends to give pessimistic porosity estimates in the case of vuggy carbonates, especially if the vugs are large. Statistical travel time-porosity relations were computed for Paleozoic limestones and dolomites. These equations are closer to the time-averaged model than the sandstone relations are.