Deposition of wax on the wall of oil pipelines is often regarded as a problem since the tube diameter is reduced. Consequently, more power is needed to force the same amount of oil through the system. A mathematical model for quantitative prediction of wax deposition for each hydrocarbon component has been developed. Each component is characterized by weight fraction, heat of fusion, and melting point temperature. A model explains how a phase transition in the flow from liquid oil to waxy crystals may create a local density gradient and mass flux, which depends on the local temperature gradient. The model predicts that wax deposition can be considerably reduced even when the wall temperature is below the wax appearance point, provided the liquid/solid phase transition, expressed by the change in moles of liquid with temperature, is small at the wall temperature. Deposition as function of time has been obtained as a solution of differential equations derived from the principles of mass and energy conservation and the laws of diffusion.