Am I doing this right? Say you make 120k. The max company match is $6000/year ($230.77/paycheck).

16% contribution = $19,200/year ($738.46/paycheck), your last paycheck contribution will get cutoff at $18,500 and you don't get the full 5% company match for the year. You'll only get $39.5 match for your last paycheck.

15% contribution = $18,000/year ($692.31/paycheck), you get the maximum 5% match but you don't hit the $18,500 IRS limit.

So you either have to choose between max match or max IRS limit? This will be harder to calculate if we get any bonus, work extra hours, cash out vacation hours, take a leave, etc.