The exclusion of capital gains from the sale of a primary residence is known under IRS code as a Section 121 exclusion. In order to qualify you must meet both the ownership test and use test. To do this you must have owned and used the property as your primary residence for 2 out of the last 5 years prior to the date of the sale. The exclusion can be up to $250,000 for a tax payer filing single and $500,000 for a married couple filing jointly.
You are generally not eligibility for the exclusion if you have taken the exclusion during the past 2 years on the sale of another residence.
Unless your ownership and use of the property are "straightforward and plain vanilla", I would definitely do further research on the topic in order to verify whether you qualify and by how much. By "straightforward and plain vanilla" I am referring to a scenario where a married couple might have purchased a property more than 5 years ago and 100% resided in the property for the 5 years and never rented the property nor used any part of the property for business purposes and held the property jointly in both of their names. This is probably the most simplistic scenario, but there are quit a number of different scenarios that can potentially effect eligibility for the exclusion.
I can give you an example. Let's say you purchased a home before you were married and subsequently you got married and now you and your spouse have lived in the property as your primary residence for 10 years, and as a result of these circumstances the deed is only in your name. You and your spouse both meet the "use" test because you both have lived in the property as your primary residence for the past 10 years. However although you meet the "ownership" test, your spouse does not meet the "ownership" test because her name is not on the deed. This may raise a question regarding qualifying for the full exclusion depending on how you and your spouse fill your taxes.
To meet the ownership requirement under these circumstances the IRS stipulates that "for a married couple filing jointly, only one spouse has to meet the ownership requirement". Note the wording indicates a married couple filling jointly. Now let's assume under a different scenario you had just gotten married yesterday and your spouse moved in with you just yesterday. Under these circumstances the IRS code stipulates that "unlike the ownership requirement, each spouse must meet the residence requirement individually for a married couple filing jointly to get the full exclusion." Ugh right. Tricky.
https://www.irs.gov/taxtopics/tc701