Help with equation: find the sell price required to sell a share

aatika

New member
Joined
Dec 13, 2018
Messages
2
Hi I want to find the sell price required to sell a share based on the following variables:

X = sell price
B = buy price
I = investment in $
D = desired profit in $
S = number of shares

I am wanting to write a program to ask the following questions and return an answer like so:

1. What is the buy price?
2. How much do you want to invest?
3. What is the desired profit?

Ans: Your sell price is X

So as you can see, if there is more than one calculation required (which I suspect is the case), then that is fine. I have figured out how to do this as a percent of profit, but I want to keep it simple by stating desired profit in $ amt.

Thanks
 

HallsofIvy

Elite Member
Joined
Jan 27, 2012
Messages
4,792
This is a bit ambiguous. I take that you buy something at "buy price", invest more money, "investment", and then sell it at "sell price". Are "buy price" and "sell price" are per share? What about "investment"? If all of these are "per share" then you pay a total of BS dollars, you invest IS dollars so you have spent a total of BS+ IS dollars. You then sell for XS dollars. Your profit is XS- (BS+ IS)= (X- B- I)S.

Or is "investment" just the total cost of S shares at B dollars per share? In that case the profit is just XS- BS= XS- I.
 

Denis

Senior Member
Joined
Feb 17, 2004
Messages
1,461
I have figured out how to do this as a percent of profit, but I want to keep it simple by stating desired profit in $ amt.
Please supply a complete example of the above, showing your steps.
 
Top