You are considered an Indian resident for a financial year:
i. When you are in India for at least 6 months (182 days to be exact) during the financial year
ii. You are in India for 2 months (60 days) for the year in the previous year and have lived for one whole year (365 days) in the last four years
Any capital gain on transfer of capital asset which is situated in India shall be taxable in India. Capital gains on investments in India in shares, securities shall also be taxable in India.
If you sell a house property and have a long-term capital gain, the buyer shall deduct TDS at 20%. However, you are allowed to claim capital gains exemption by investing in a house property as per Section 54 or investing in capital gain bonds as per Section 54EC.
Capital gains are exempt proportionately if the cost of the new asset is less than net consideration. Remember, if the new asset purchased is transferred or sold back within 3 years, then the profit exempted will be added to the income in the year of sale/transfer. The benefits above may be available to the NRI even when he/she becomes a resident – until such an asset is converted to money, and upon submission of a declaration for the application of the special provisions to the assessing officer by the NRI.