setting calculation