If you’re just going to do Roth or convert to Roth in the solo profit sharing plan, just set it up to allow voluntary after tax contributions, contribute that, and convert to Roth. No 6% calc. needed. You just can’t contribute more than your Net Earnings from Self-Employment (NESE).
Otherwise, you take line 31 of your Form 1040 schedule C, subtract 1/2 of your SE tax, subtract the employer contribution and then limit that result to the comp limit under 401(a)(17) to get the “what” that you asked about, which is your NESE. Multiply this by 6% to get the contribution limit (and you of course noticed it was a circular equation as the contribution itself affects the contribution limit.
If you add a DB plan, the contribution to that plan is also included in the equation used to determine the NESE which in turn is used to determine the 6% limit.
Now that you have this, review your calc again. You almost got it - close but no cigar.
Keep in mind that your max DB contribution is limited as well. Its based on your highest consecutive 3-year average NESE. Thus, contributing any deductible amount to the PS plan is hurting the DB limit affecting the DB contribution that the actuary is calculating for you. It’s not uncommon for owner-only combo plans to blow up due to being impatient when waiting for these calcs to be done - to give the owners the amounts that can actually be contributed and deducted.