# Calculate stop loss

---- Preface ----

• I am not sure if this is the correct place to post this kind of question. If not, please let me know, and I will remove it.
• If you need any clarifications or require more information, please let me know, and I will update the post.
• I am making a calculator in Excel that I will then convert into a JS function to use on my website.
• I had a look online on google ect. I could not find exactly what I needed.
• I posted this also here: https://stackoverflow.com/questions/72675007/calculate-trade-position-cost-and-stop-loss - If this is not allowed please let me know. ---- Required functions ----

- Input this data:

1. Account size (\$) - A\$
2. Risk to account per trade (%) - R%
3. Share price (\$) - S\$

- Output this data:

1. Trade cost (\$) - How much it will cost to buy x amount of shares.
2. Share QTY (Units) - How many shares are purchased for x trade cost.
3. Stop Loss (\$) - The lowest the share price can go before risking more than the R%
4. Risk to account in (\$)
5. position new value at Stop Loss (\$)
6. account loss (\$)

---- WHAT I CURRENTLY HAVE ----

• Risk to account in (\$) ### =B1*B2
• Share QTY (units) ### =B7/B8
• Position value (units) ### =(B8*B9)/(B8/B10)
• Account loss (units) ### =B7-B11