This paper examines the corporate investment effect of a time limit on the use of net operating losses (NOLs). We predict that, when countries limit the use of NOLs to a few years instead of allowing indefinite use, managers of loss-making firms have an incentive to increase investments to recover these losses quickly. Using exogenous shocks to profitability from two earthquakes in Italy and variation in the tax treatment of NOLs over time, we find support for this prediction: when the use of NOLs is restricted in time (unrestricted), firms facing losses increase (do not increase) investment. This effect is stronger for firms with shorter investment horizons, in more profitable industries, and with less volatile profits. We provide external validity for this finding using a large panel of firms from European Union countries exploiting variation in tax regimes. These results indicate that restricting loss offsets can increase investments.