The amount of available energy is a critical limitation of battery-powered electronic systems. The classic design goal is to minimize system energy consumption subject to performance constraints. An alternative objective would be to maximize performance under energy constraints, which requires a method for computing the energy budget corresponding to a certain battery lifetime. This paper presents such a method for systems with a fixed schedule of active intervals. Our method computes the energy budget for each active interval and guarantees that the battery survives until the end of the schedule. We rely on an accurate analytical battery model that takes into account nonlinear changes in the battery voltage, capacity loss at high discharge rates, charge recovery, and capacity fade over time. As the battery model is computationally expensive, we also present efficient approximations for computing the upper and lower bounds on the energy budget for each active interval. The main limitation of this work is our assumption that the battery current is the same for all active intervals.