Typically, the T+n has many assumptions, the most important (IMO) is the value to "assume" for the IV 21 days from now (for the T+21 case). The standard practice is to then use an option pricing model, such as BSM, and plug in the parameters (Interest, yield, IV, Time to expiration (This is set to Time to expiry 21 days from now for the T_21 case), strike, and then sweep the underlying price input across the entire range of interest. Do this for all option positions, long and short, and merely sum the results for each underlying price point.
The above is a bit simplified, typical implementations have some extra moving parts.