The dispersion of a pair of prisms is analyzed by means of a ray-tracing method operating at other than tip-to-tip propagation of the prisms, taking into consideration the limited spectral bandwidth. The variations of the group delay dispersion and the third-order dispersion for a pair of prisms are calculated with respect to the incident position and the separation between the prisms. The pair of prisms can provide a wide range of independent and continuous third-order dispersion compensation. The effect of residual third-order dispersion on the pulse contrast ratio and pulse duration is also calculated. The residual third-order dispersion not only worsens the pulse contrast ratio, but also increases the pulse duration to the hundreds of femtosecond range for a tens of femtosecond pulse, even when the residual third-order dispersion is small. These phenomena are helpful in compensating for the residual high-order dispersion and in understanding its effect on pulse contrast ratios and pulse durations in ultrashort laser systems.