Well, if the 1031 was done correctly, and I presume it was, your tax basis in the replacement property that you now want to sell, is the same as the tax basis in your old property. The would presume that you did a straight exchange.
So when you sell the property you now own, your gain is based upon the gross selling price of the property you are now selling less the substituted tax basis from the old property less the cost of sales, commissions, legal, closing costs of the property that you are now selling.
If you made any improvements to the property you are selling that you didn't expense, that would decrease your gain and your gain would be increased by any depreciation allowed or allowable on the property you are selling.
So basically you first have to determine the tax basis of the property you exchanged.
If you purchased that property, then you would take the acquisition cost, plus any closing expenses, plus any improvements, less the depreciation allowed or allowable, plus any expense of the exchange and you would then have your starting point in determining the tax basis of the property you exchanged, which also becomes the beginning tax basis of the property you are now selling.
To that total you would add any improvements, subtract any depreciation allowed or allowable, & add any selling expense of the property you are now selling (legal, deed stamps, commissions, etc.); that would give you the adjusted basis of the property being sold.
You subtract that total from the Gross Selling Price and you have the taxable capital gain on the sale.
If you have any questions, I'll be happy to address them.