Use this App to calculate the average price of stocks with a stock that you own and the same stock that you want to buy at a different price.
Enter the number of stocks that you own with their price, then enter the amount you want to buy with it's price to calculate the average price per stock it will be after buying.
The app also has a Wanted Profit Calculator. You enter your current stock price, the number of stocks you have and the profit you want to make when you sell. The app will let you know at which price to sell your stock.