Calculating tax on selling rental home

how is the capital gains tax calculated when a rental house has been sold?