calc profit by last end game