Sincere apologies for the following shameless copy & paste:
There are several different formulas for calculating IBUs. A lot of people use the Rager formula. However many other people including myself prefer to use Tinseth as it is a little more accurate. Most people use brewing software like BeerSmith or StrangeBrew to run the calculations. However, if you just want to learn to do it by hand, the following is the Taylor-ized Tinseth estimation method that turns out surprisingly consistent with most homebrewing software. These rules are designed for pellet hops used in 5 gallons final boil volume, 60-minute boil, @ approximately 1.060 OG.
3.6 * oz * AA% = IBUs (bittering with hops added @ about 60 minutes)
1.6 * oz * AA% = IBUs (flavor @ 10-15 minutes)
0.6 * oz * AA% = IBUs (aroma @ 5 minutes)
Add all these together, and then add another +1.5 to the final total.
For higher gravity worts (e.g., >1.075), the primary factors are reduced somewhat to about 3.0, 1.3, and 0.6 (the last factor stays same). For low gravity worts (e.g., <1.045), the factors are increased to around 4.0, 1.9, and 0.6 (always stays same). Dry hops or very late boil additions add almost zero IBUs and can be ignored unless using a butt-ton, then add maybe an extra 2-4 IBUs, unless you’re whirlpooling warm for a long time in which case you should treat them same as flavor additions per the guidance above.
For different batch volumes other than 5 gallons, you need to multiply the final result by 5/V.
I’d treat FWH the same as a 60-minute addition… since it’s in for the same 60 minutes. If you wanted to you could add an extra 5-10% from any FWH additions to reflect reality, but if you believe in the “smoothness” thing then you might as well not calculate IBUs at all. ;D
Also, as the others have mentioned, you typically would not adjust amounts of hops late in the boil as far as IBUs go, but keep those amounts the same, and instead only adjust your bittering or FWH amounts to fix the IBUs. So, figure out the IBUs from all your late additions, then subtract from the IBU goal, and back-calculate your bittering or FWH additions to ensure the IBUs stay the same.