The actual arithmetic on £40,000
Start with the cash option. A bonus of £40,000 to someone already earning above £50,270 is taxed at 40% income tax and 2% employee NI — a 42% combined rate. You keep £23,200. Put £20,000 into an ISA and the last £3,200 sits in a general investment account, already taxed.
Now the sacrifice option. The £40,000 never hits payroll as earnings, so there's no income tax and no employee NI. It lands in the pension intact. Your employer also saves the 15% Class 1 secondary NI contribution on that £40,000 — £6,000. Most decent UK employers route this back into your pension as an 'employer NI uplift', taking the total contribution to £46,000. Some only share half, some share nothing. MoneyHelper's salary sacrifice explainer walks through the mechanics.
The delta isn't a close-run comparison.
Before any investment return, you're ahead by £16,800 if your employer keeps the NI rebate, and £22,800 if they pass it back.