Area calculation and optimization