We develop an economic model for fossil-fuel and carbon-free energy supply and demand with capital and labor as production factors, and endogenous technological change through learning by research and learning by doing. We use the model to study inter-temporally efficient carbon taxes for climate stabilization targets. Calculations show an inverted U-curve with an initial rise of carbon-taxes that sets in motion the transition from fossil-fuels to carbon-free energy sources, followed by a drop in carbon taxes when the carbon-free energy sources have grown mature.