Two stories: forming the corporation (§351), then taking cash out later (E&P)
Imagine you own a building or equipment and you want a new corporation to own it instead. You hand the property to the corporation, and in return you get stock (ownership shares).
The tax code often lets you wait to pay tax on the built-in profit — that deferral lives in §351. You only pay tax now if you also pull out something that is not stock (usually cash). Tax people call that extra stuff boot.
Years later, when the corporation pays you cash, the tax label on that cash is a separate story: dividend first (from profits), then a tax-free return of your investment, then capital gain if anything is left.
You transfer property. The corporation gives you stock (and maybe some cash).
“Adjusted basis” is what you already have invested for tax purposes. “Fair market value” is what the property is worth today. The gap between them is your built-in profit.
This is a separate moment — not part of the formation math above. Plug in any distribution facts.
C corporations keep a profits ledger called earnings and profits (E&P). Cash paid to shareholders is labeled in a fixed order: dividend first (from E&P), then a tax-free return of capital (reduces your stock basis), then capital gain if cash still remains.
Teaching tool only — not tax software. The §351 and E&P sketches follow the usual Enrolled Agent Part 2 ordering.