wligithub/tax-tool

filing_cost_basis

Closed this issue · 2 comments

The script's filing_cost_base and total capital gain do not match results from https://www.costbasistools.com/cashtoboot/boot.php.

in stock FAQ:
Q54. I am a U.S. holder of VMW stock. If I received a mix of cash and stock consideration, will I recognize gain or loss on the
exchange?
A. This is technical. U.S. holders (as defined in the proxy statement/prospectus) of VMW stock who exchange their shares for a
combination of stock and cash consideration generally will recognize gain, but not loss, for U.S. federal income tax purposes on
the exchange. If the sum of the fair market value of the Broadcom stock and the amount of cash received exceeds the tax basis
in the shares of VMW stock exchanged, the stockholder generally will recognize taxable gain on the exchange equal to the lesser
of the amount of such excess and the amount of cash received. As always, please consult your tax advisor.

ergo:

sum_total = lot["avgo_share"] * AVGO_FMV + lot["total_proceeds"]
total_capital_gain = sum_total-(lot["share"] * lot["purchase_price"])
gain_to_report = max(0, min(total_capital_gain, lot["total_proceeds"]))
==> max of 0 to ensure "but not loss"
==> the min is to get the "lesser of the excess and cash received"
filing_cost_base = lot["total_proceeds"] - gain_to_report

I plugged values into https://www.costbasistools.com/cashtoboot/boot.php and got matching filing_cost_base and gain_to_report.

Of course, this doesn't take the Dell dividends into account. But I don't understand why those should be taken into account to lower the original acquisition cost considering that we already paid income tax on those dividends.

Of course, this doesn't take the Dell dividends into account. But I don't understand why those should be taken into account to lower the original acquisition cost considering that we already paid income tax on those dividends.

ok, this was with me not haven't read the special dividend 8937. The one for 2021 does say there was a $16.58 non-taxable return of basis.

i added some additional clarifying comments to the tax-tool output.txt in this fork.. particularly the difference about the special dividend and what part of it applies