The easiest way to do this is to multiply the probability percentage by the estimated cost impact, providing a risk contingency for each line item. Type a formula in the Contingency cell. This contingency is usually calculated as a percentage. If the phase is 100 days of effort, the 20% contingency would be another 20 days.
As the project progresses, the level of risk decreases as the requirements and problems are known, so the percentage will be reduced. In the closing phase, the percentage added could be as low as 5% or none.