PVI is calculated using the 2 party vote share in the state vs the nation not the margin.
Fine, so
2016: Montana Trump+20.5, Nation Clinton +2.1, Difference Trump+22.6
2020: Montana Trump +16.4, nation Biden +4.5, Difference Trump +20.9
Where does the +11 come from? Do we take Bullock's 2016 run into account?
(And using 2-party share accentuates the discrepancy further)
A useful way (though not 100% technically correct) to think about it:
The numerical values that the CPVI produces are estimates of how many points the other party would need to increase their own vote share in a particular district or state to flip it, assuming that the national popular vote is even and neutral.
For example, a PVI of D+5 roughly describes a district that has a margin of D+10 points if the NPV is even or neutral. In this case, Republicans would need to increase their own vote share in that district by 5 points to flip it (with a symmetrical 5 points decrease in Democrats' vote share). This is why the district has a PVI of D+5.
In the case of Montana, here is a rough way (still not technically 100% correct) of looking at it:
2016: Montana was R+20.5 and the nation was D+2.1
For Dems to flip Montana assuming symmetry, they would need to increase their own vote share by: 20.5/2 = 10.3 points. For Republicans to break even nationally, it would take 2.1 / 2 = 1.1 points. 10.3 + 1.1 = R+11.4 for 2016 (addition was performed because R+20.5 and D+2.1 would have opposite signs on the same scale)
2020: Montana was R+16.4 and the nation was D+4.5
(16.4/2) + (4.5/2) = R+10.5 for 2020
Now average 2016 (R+11.4) and 2020 (R+10.5) and you get roughly
R+11.
The actual formula takes into account the specific vote share % of each party and the % combined for both parties (to account for the influence of third parties).
Here's one version of the actual and correct formula that Cook uses (this particular form assumes that the district and nation at-large were both won by Dems in the last two presidential elections and that the district on average is more Democratic than the nation):
Adjusted national Democratic average across two elections:
(National Dem % in first election + National Dem % in second election) / (National Dem % in first election + National Dem % in second election + National GOP % in first election + National GOP % in second election)
Adjusted district Democratic average across two elections:
(District Dem % in first election + District Dem % in second election) / (District Dem % in first election + District Dem % in second election + District GOP % in first election + District GOP % in second election)
Cook PVI Value:
Adjusted district Democratic average across two elections MINUS Adjusted national Democratic average across two elections
(Use the adjusted national and district Republican averages if the state/district in question is more Republican than the nation)