calculation of costs after incremental rebuilds