Your 401(k) contribution has no effect on your Roth IRA contributions. You only need to make sure you meet the eligibility requirements for funding a Roth IRA. (For more on this, see Roth IRA: Back To Basics.)
However, your participation in the 401(k) plan may affect your ability to take a tax deduction for any traditional IRA contributions. It will not affect the amount you are able to contribute (up to an annual $5,500; $6,500 if you’re age 50 or older, for 2018).
Basically, if you are covered by 401(k) (or any employer-sponsored plan), your modified adjusted gross income (MAGI) becomes a factor in the deductibility of IRA deposits. For example, In 2018, single taxpayers/plan participants can't take an IRA deduction if their MAGI is $73,000 or over; those making between $63,000 and $73,000 could take a partial deduction. Those making under $63,000 or less can take a full deduction – regardless of their 401(k) participation.
Publication 590-A from the IRS explains the deductibility of IRA contributions; it provides the formula you need to calculate how your 401(k) plan contributions affect your IRA contributions. If you are single, you only have to calculate your own contributions, but if you are married anf filing jointly, you must take into consideration your spouse’s employer plan participation and any deductible contributions your spouse makes to IRAs, too. Calculate your IRA contributions and your spouse’s contributions separately using the worksheet that is available on the IRS website.
If you complete the worksheet and discover that some or all of your IRA contributions are nondeductible, you may want to take out the amount you overcontributed. There is no additional tax or penalty to remove the excess contribution as long as you do so before you file your taxes for the year in which the contribution was made.
Although you do not pay income tax on the removal of the principal amount of the contribution, you may encounter a gain on your account attributable to the contribution, in which case you also need to remove that amount. Any gain or income you made on the contribution also needs to be added to your gross income for the year and may be subject to a 10% early withdrawal penalty if you are under 59½. For these reasons, it is wise to determine your eligibility for IRA contributions before you make them.
In short, depending on your income, contributing to a 401(k) can limit your ability to contribute to an individual retirement account. If you are what is called an “active participant” in an employer-sponsored plan, or your spouse is, you need to follow a formula to determine whether you can make deductible IRA contributions. To learn more, see Are You an Active Participant? and Traditional IRA Deductibility Limits.