Calculate Size Function