Closed ShacharKidor closed 1 year ago
Request JSON
{
"grant_date" : "dd/mm/yyyy",
"sale_date" : "dd/mm/yyyy",
"sale_amount" : 20,
"grant_amount" : 55,
"stock_symbol" : "PANW",
"tax_rate" : 37 | null,
"monthly salary" : 10_000 | null
}
Response JSON
{
"gross_amount" : 10000,
"net_amount" : 2000
"tax_deductions" : [
{
"effective_rate" : 37,
"taxed_amount" : 2000,
"amount" : 0,
"reason" : "because ... "
},
{
"effective_rate" : 37,
"taxed_amount" : 2000,
"amount" : 0,
"reason" : "because ... "
},
]
}
The purpose of the calculator is to be able to estimate the amount of money a user gets when selling his RSUs (after tax reductions).
Details we need to get from the user:
The output: The total gain of the user on the selling date, after taxes ("the Net amount").
Things we need to calculate: - Phase One
Grant Price - we can calculate that based on the stock price on the grant date and the grant amount.
The price of the Stock on the grant date (from google).
The price of the stock today - we can get it from google (as for the stock price on the selling date - I think it would be hard to predict - we can keep it the same as today's price - and of course, we need to reflect it to the user).
The total gain before taxes -("The gross amount") calculate based on the number of stocks to sell and the price of the stock today.
Whether the selling date is two years after the grant date or not - affects the taxes calculation.
Income tax - calculate according to the monthly salary - we can query the API of the Internal Revenue Service to get the relevant tax rate for the user's monthly salary. The reduction of the income tax depends on (4) - if the selling date is after two years from the grant date we will calculate the income tax reduction only on the following amount: Stock price on the grant date * number of stocks to sell. (need to verify that).
Capital gains tax - the calc of this tax also depends on (4) - if the selling date is after two years from the grant date we will calculate the Capital gains tax only on the following amount: (Price of the Stock today - Price of the stock in the grant date) * Number of stocks to sell
Phase two: