calculate left