Selling rental property that was previously primary residence

We lived in our home from 1987 until 2009 and have been renting it since 2010. If we sell it do we have to pay capital gains or just pay taxes on the recaptured depreciation? We are trying to decide if we should sell or not. Also if we pay capital gains - would we use the beginning value of the property of when we started using it as an investment or the original value when we built it in 1987?