You need to invest an amount into a qualified opportunity fund equal to the amount of 1231 gain that you wish to defer, within 180 days of the date on which you otherwise would have recognized the gain (i.e., in the absence of an election to defer the gain). In the case of gain that you recognize through a pass-through entity, the starting date for the 180-day period generally can be, at your election, (i) the same date as the pass-through entity (if it were to defer the gain), (ii) the last day of the entity's tax year in which it realizes the gain or (iii) the due date (without extensions) for filing the pass-through's income tax return for such tax year.