I finally figured out how to fill out Form 7203 in my 1040 personal tax return and have it matched with my 1120S S-Corp return. This is an easy way to find out what your stock basis is.
Notice the following:
In your 1120S, go to Schedule L Line 27b (Liabilities and Shareholder's Equity) beginning of tax year.
Take that amount, add Schedule K Line 18 Income, add Line 16b Tax-Exempt Income, subtract Line 16d Distributions. You get Schedule L Line 27d End of tax year.
In Form 7203
Stock block: 1
Stock basis Part 1 Line 1: 1120S Schedule L Line 27b (Liabilities and Shareholder's Equity) beginning of tax year. Enter the entire amount if you're the sole owner, or if you have a partner, divide by their percentage. So if you own 50%, then enter half this amount.
Enter the rest using your Schedule K-1
Form 7203 Line 15 Stock basis at end of year should match the figure in your 1120S Schedule L Line 27d End of tax year
This figure will be in your 2022 1120S Schedule L Line 27b beginning of tax year and will be your Form 7203 stock basis beginning in 2022.
I tested this for the past 12 of my tax returns and they all matched up. Hope it helps.