Roth 401k to Roth IRA Rollover with Employer Matching

Hello, I am 35 years old and am trying to figure out my contribution basis for my Roth IRA which includes funds rolled over from both a Roth 401k and a regular 401k with employee contributions. 

 

In 2021, I stopped working at a company and had accumulated the following accounts: 

Roth 401k (post-tax): $10k personal contributions, $3k earnings and no employer match

Traditional 401k (pretax): $5k employer matching contributions, $2k earnings

 

Upon leaving the company in 2021, I rolled over the full $20k from both accounts to my Roth IRA, which was already opened and had been funded separately since 2017, and I paid income taxes on the $7k from the traditional 401k. Here are my questions: 

 

1. How much of the $20k that I rolled into my Roth IRA can I withdraw today without paying the 10% penalty?

2. Does that amount change/increase in 2026 (5 years after the rollover), or is the 5-year rule irrelevant since the Roth IRA was first contributed to in 2017 (7 years ago)?

 

 

Thank you in advance.