If your main home was not used as your main home for any continuous period or periods of more than 12 months during the bright-line period, the main home exclusion will not apply to the period(s). You'll pay tax on the portion of the gain on sale that relates to the period(s).