Method for calculation