We investigate how uncertainties in key parameters in the carbon cycle and climate system propagate to the costs of climate change mitigation and adaptation needed to achieve the 2 and 1.5 °C targets by 2100 using a stochastic version of the simple climate model for optimization (SCM4OPT), an integrated assessment model. For the 2 °C target, we find a difference in 2100 CO2 emission levels of 20.5 GtCO2 (− 1.2 GtCO2 to 19.4 GtCO2), whereas this difference is 12.0 GtCO2 (− 6.9 GtCO2 to 5.1 GtCO2) for the 1.5 °C target (17–83% range). Total radiative forcing in 2100 is estimated to be 3.3 (2.7–3.9) Wm−2 for the 2 °C case and 2.5 (2.0–3.0) Wm−2 for the 1.5 °C case. Carbon prices in 2100 are 482 (181–732) USD(2005)/tCO2 and 713 (498–1014) USD(2005)/tCO2 for the 2 and 1.5 °C targets, respectively. We estimate GDP losses in 2100 that correspond to 1.9 (1.2–2.5)% of total gross output for the 2 °C target and 2.0 (1.5–2.7)% for the 1.5 °C target.