A. The answer is No.
Based on IRS ruling - married couples filing jointly could exclude up to $500,000 of the gain on the sale of their primary residence, if they have owned their home and used it as the main home for at least two of the past 5 years before the sale date. Any gain after the $500,000 amount will be subject to capital gain tax.
Unfortunately, if you suffer a loss from selling your primary residency, you can NOT deduct the loss on the sale.