In Australia we have a special Capital Gains Tax Free status for a persons home, or Principal Place of Residence.
One of the great myths is that you only have to live in it briefly for it to become a tax free asset and sadly this is not the case. It is not possible to extinguish the full gain by living in the property for any period of time, even though many people try and do this and run the risk of being caught out later.
You need to be very careful as the Australian Tax Office is now matching sale records to rental lists and is highly likely to prompt an investigation, even if it is a few years after the sale event. Being caught out can be a very expensive mistake once penalties and back dated interest charges are imposed.
The actual position for Capital Gains Tax is if you have bought a property while living overseas and rented it out, then it is a taxable property on eventual sale no matter how long you may spend actually living in the property later on.
The way the tax calculation works will be on a pro rata basis so the longer you live in it the more of the gain will be tax free. If you never move in, then the full gain would be subject to Capital Gains Tax.
You will be entitled to a tax free portion for the period of time the property is used as your principal residence. For example if you bought this and rented for 4 years prior to return and then lived in the house for 1 year when back in Australia, then 1/5th would be tax free and 4/5th of the gain would be subject to capital gains tax.
If you can stay in it longer prior to sale then the taxable portion can come down significantly.
If instead of living in the property for just 1 year, you stayed for 5 years, then 5/9th would be tax free and only 4/9th taxable. This tax free portion will continue to increase each year subsequent year of occupation.
The only exception to this rule is if you had lived in the property as your home from the time it was first acquired. If that was the case then you may be entitled to a 6 year tax free period on Capital Gains tax even if the property was rented. There are additional conditions on this so you should check with your Australian tax advisor to see if you may qualify.
You should also remember that once you have owned any asset in Australia more than 12 months then you will also enjoy a further 50% tax free allowance on the Capital Gain.
I have had situations where some people choose to move back in to the property briefly to try and reduce the potential Capital Gains Tax. Sometimes the cost and inconvenience of moving in and then out of the house is greater than the tax saved, so you need to make a rational decision as to whether it is indeed worth living in the property or simply moving into your preferred residence the first time.