wligithub/tax-tool

Calculation of Shares Purchase

Closed this issue · 3 comments

Hi.

For the ESPP lot:

I'm sure if I'm missing something here.

Is there a reason to "Grant Data Market Value" instead of "Purchase Value per Share" to calculate the discount rate?

The output is higher than what I expected for "total avgo cost basis:"

I know the label said AVAGO's cost basis so this is where I could be wrong. But the flow of the code appears to just establish the discount rate for vmware shares.

A friend of mine point out to me that the cost basis should still match "calculation of gain" in the "ESPP Confirmation".

Example:
Grant Date 03-01-2021
Purchase Begin Date 03-01-2021
Purchase Date 02-28-2022

Calculation of Shares Purchased
Grant Date Market Value $140.410000
Purchase Value per Share $117.320000

Purchase Price per Share
(85.000% of $117.320000) $99.720000

Looking at your code, it looks like you're using the grant date market value.

Output:

DEBUG

offer_date_discount= 21.0615 (15% of) offer_date_fmv= 140.41
price use for cal: 140.41

The output came out right for me after playing around with your code.

Matched ESPP Confirmation's Cost Basis:

DEBUG

offer_date_discount= 17.598 (15% of) purchase_price= 117.32
price use for cal: 117.32

Thanks!

In your example, the purchase price is 99.72, please see "purchase price" field of the output file. 15% is grant day fmv (21.0615) is to calc ordinary income. Please see https://zajacgrp.com/insights/espp-tax-rules-you-need-to-know-and-how-theyre-affected-by-qualifying-dispositions.

thank you.

that's kinda the issue I have with the calculation. This value: 21.0615 is base of the 140.41. If you want to arrive at 99.72, shouldn't you base it of the purchase price 117.32 where the discount is 17.598 instead?

Thanks again for the hard work!

The purchase price is 15% of 117.32, which is 99.72. In addition to purchase price, there is a bargain element that calculated separately to report as ordinary income when share is disposed. Which is 15% of grant day fmv, which is 21.0615. Please see https://zajacgrp.com/insights/espp-tax-rules-you-need-to-know-and-how-theyre-affected-by-qualifying-dispositions for details.