calculate number and value