Created area calculation function