Accurate imaging of seismic reflectors with depth migration requires accurate velocity models. In frontier areas with few well constraints, velocity estimation generally involves the use of methods such as normal moveout analysis, seismic traveltime tomography, or iterative prestack depth migration. These techniques can be effective, but may also be expensive or time-consuming. In situations where we have information on formation tops from a series of wells which intersect seismic reflectors, we use a least-squares optimization method to estimate velocity models. This method produces velocity models that optimize depth migrations in terms of well constraints by using least-squares inversion to match the depth migration images to formation tops. The well log information is used to optimize poststack migration, thereby eliminating some of the time and expense of velocity analysis. In addition to applying an inversion method which optimizes depth migration in terms of formation tops, we can use a sensitivity analysis method of "most-squares inversion" to explore a range of velocity models which provide mathematically acceptable solutions. This sensitivity analysis quantifies the expected result that our velocity estimates are generally less reliable for thin beds than for thick beds. The proposed optimization method is shown to be successful on synthetic and real data cases from the Hibernia Field of offshore Newfoundland.