Biodiversity offsetting schemes permit habitat destruction, provided that losses are compensated by gains elsewhere. While hundreds of offsetting schemes are used around the globe, the optimal timing of habitat creation in such projects is poorly understood. Here, we developed a spatially explicit metapopulation model for a single species subject to a habitat compensation scheme. Managers could compensate for destruction of a patch by creating a new patch either before, at the time of, or after patch loss. Delaying patch creation is intuitively detrimental to species persistence, but allowed managers to invest financial compensation, accrue interest, and create a larger patch at a later date. Using stochastic dynamic programming, we found the optimal timing of patch creation that maximizes the number of patches occupied at the end of a 50-yr habitat compensation scheme when a patch is destroyed after 10Â yr. Two case studies were developed for Australian species subject to habitat loss but with very different traits: the endangered growling grass frog (Litoria raniformis) and the critically endangered Mount Lofty Ranges Southern Emu-wren (Spititurus malachurus intermedius). Our results show that adding a patch either before or well after habitat destruction can be optimal, depending on the occupancy state of the metapopulation, the interest rate, the area of the destroyed patch and metapopulation parameters of the focal species. Generally, it was better to delay patch creation when the interest rate was high, when the species had a relatively high colonization rate, when the patch nearest the new patch was occupied, and when the destroyed patch was small. Our framework can be applied to single-species metapopulations subject to habitat loss, and demonstrates that considering the timing of habitat compensation could improve the effectiveness of offsetting schemes.