I would answer this by looking at the following TAX information
https://www.pdffiller.com/en/project/47213965.htm?form_id=6962262
What is your AGI on your tax return? Line 37 or 38
What is your taxable income on your tax return? Line 43
What is your filing status? Page 1 box 1,2,3,4 or 5
Then look up your filing status and taxable income here
2016 Tax Rate Schedules - Fairmark.com Fairmark.com
For example, you are trying to see if your taxable income is "just above" one of the tax brackets listed for your filing status-
for example if you are married and file a joint return, and have a taxable income of $85,000 you are over the 25% bracket cap of 75,300
so in this case use the regular 401k (pre-tax) for at least (85,000-75,300=$9700), then use the Roth on the rest (18,000-9700=$8300).
The challenge with doing this is many:
1) You cannot recharacterize a contribution after the fact (unless someone here knows something I don't)
2) error on the side of pre-tax, so if you expect to be $9700 over, budget to contribute $12000 to pre-tax to be safe
3) This calculation will change EVERY YEAR so you need to tax plan in January for what you will file 15 months later in April. This is not easy with tax code changes (deductions, income, adjustments to taxes, payroll deductions), raises (you hope)
4) Doing this will save you a decent amount in taxes and it should be easy to calculate the benefit looking at tax returns year over year.
5) the match is always pre-tax, so even if you did $18,000 in Roth, the match would be 100% pre-tax