A classroom model of global warming, fossil fuel depletion and the optimal carbon tax is formulated and calibrated. It features iso-elastic fossil fuel demand, stock-dependent fossil fuel extraction costs, an exogenous interest rate and no decay of the atmospheric stock of carbon. The optimal carbon tax reduces emissions from burning fossil fuel, both in the short and medium run. Furthermore, it brings forward the date that renewables take over from fossil fuel and encourages the market to keep more fossil fuel locked up. A renewables subsidy induces faster fossil fuel extraction and thus accelerates global warming during the fossil fuel phase, but brings forward the carbon-free era, locks up more fossil fuel reserves and thus ultimately curbs cumulative carbon emissions and global warming. For relatively large subsidies social welfare is more likely to fall as the economic costs rises more than proportionally with the size of the subsidy. Our calibration suggests that such subsidies are not a good second-best climate policy.