We analyze a dynamic stochastic general-equilibrium (DSGE) model with an externality through climate change from using fossil energy. A central result of our paper is an analytical derivation of a simple formula for the marginal externality damage of emissions. This formula, which holds under quite plausible assumptions, reveals that the damage is proportional to current GDP, with the proportion depending only on three factors: (i) discounting, (ii) the expected damage elasticity (how many percent of the output flow is lost from an extra unit of carbon in the atmosphere), and (iii) the structure of carbon depreciation in the atmosphere. Very importantly, future values of output, consumption, and the atmospheric CO2 concentration, as well as the paths of technology and population, and so on, all disappear from the formula. The optimal tax, using a standard Pigou argument, is then equal to this marginal externality. The simplicity of the formula allows the optimal tax to be easily parameterized and computed. Based on parameter estimates that rely on updated natural-science studies, we find that the optimal tax should be a bit higher than the median, or most well-known, estimates in the literature. We also show how the optimal taxes depend on the expectations and the possible resolution of the uncertainty regarding future damages. Finally, we compute the optimal and market paths for the use of energy and the corresponding climate change.