Capital gains are calculated by finding the difference between the price at which you sold the property and price at which you bought. Thus, capital gains calculations are the aggregation of all property bought or sold over the course of the year minus the cost bases (price at which you bought or received the property) of each respective property. Note that property held for less than a year (short term capital gains) is subject to a higher tax bracket than property held for a year plus one day (long-term capital gains) or more. 

Did this answer your question?