If you sold your principal residence, you may qualify to exclude all or part of the gain from your income. Your capital gain is calculated the same way as it is for federal purposes. Any amount that is taxable for federal purposes is taxable for New Jersey purposes. Single filers can qualify to exclude up to $250,000. Joint filers can qualify to exclude up to $500,000. This is true regardless of age, as long as you owned and lived in the residence for 2 of the 5 years prior to the sale.
For additional information, see the section on Net Gains or Income From Disposition of Property in the New Jersey Income Tax return instructions 1.06MB.
Information on buying or selling a home in New Jersey is available in the New Jersey Tax Guide 660K.