A theoretical study has been performed to check the possibility of using ultrabroadband nanosecond electromagnetic pulses as a geosteering tool for horizontal drilling to estimate the distance to the oil-water contact (OWC) in a floating oil accumulation. The voltage of a microwave-bandwidth pulse at the dipole receiver of a downhole radar was modeled for the case of a horizontal borehole near OWC in a formation saturated with oil and water. Numerical solutions to the boundary problem formulated on the basis of the Maxwell equations were obtained with the Microwave Studio software (www.cst.com). The frequency-dependent dielectric constants of the layered saturated formation and the drilling fluid were assumed according to experimentally tested models. The modeling has demonstrated that nanosecond electromagnetic pulses arriving from a layered oil-water contact can in principle be acquired and the distance from the wellbore to the OWC median can be inferred from the respective time delays recorded by a downhole radar. Additionally, the possible dynamic range and accuracy of sensing have been estimated.