A theoretical analysis of the effect of duration on the damage of structures subjected to earthquakes is presented. Earthquake excitation is modeled as a nonstationary random process. Estimates of the first-passage probability of a simple oscillator are employed to choose modulated Gaussian random processes consistent with a prescribed response spectrum. Expressions for the mean damage of a structure are derived using an approach similar to the Miner-Palmgren rule for failure caused by cyclic loads. The expected damage expressions are then evaluated for a structure subjected to modulated Gaussian random processes of varying duration. Two types of structures are examined: a steel structure and a reinforced concrete structure.