ROI measures the “best effort allocation”. It is equal to Gain divided by Work Duration Remaining (i.e. Work Duration Not Dropped - Work Duration Already Done).
In other words, ROI is the gain per unit of time remaining to close the task.
$$ ROI=\frac{\text{Gain}_{out}}{\text{Work Duration Remaining}} $$
Once the task is done, the ROI to the ROI effectively obtained, aka:
$$ ROI=\frac{\text{Gain}_{out}}{\text{Total Work Duration}} $$