Just in case you were not able to use the chat - I am switching to Q&A mode and porting the answer below.
Please feel free to communicate if you need any clarification or have other tax related issues.
Hi and welcome to Just Answer! "3.8 % Medicare Tax" that you referred is officially named the Net Investment Income Tax
(NIIT) which went into effect on Jan. 1, 2013. The NIIT will affect income tax returns of individuals, estates and trusts for their first tax year beginning on (or after) Jan. 1, 2013. It will not affect income tax returns for the 2012 taxable year that will be filed in 2013. Individuals will owe the tax if they have Net Investment Income and also have modified adjusted gross income over a certain thresholds - assuming you are filing a joint tax return - the threshold amount is $250,000.
If you are Real Estate Professionals - that makes no difference - unless you are in real estate business and report all your income as business income on schedule C. If however - that is your Investment Income and your modified adjusted gross income is more than $250,000 - you will be subject of NIIT.
To the extent that gains are not otherwise offset by capital losses - gain from the sale of investment real estate (including gain from the sale of a second home that is not a primary residence) - is taken into account in computing Net Investment Income. The gain that is not recognized because of section 1031 exchange - is not subject of NIIT.
Let me know if you need any clarification or if you need any help to estimate your possible tax liability.