The cost of each individual risk must be estimated based on the specifics of the risk -- there is not a formula for calculating.
Let's take a simple example. The risk is rain delays construction work for a day. The costs are going to consist of items such as the lost day of revenue from the future sale or lease, any costs associated with making up the lost time (overtime, added resources), replacement of any materials damaged by the rain, paid labor that is unable to work for the day, etc. You need to brainstorm the list with the team, estimate the costs, and add them up, just like you would a WBS.