Calculates a value (not correct)