This question was asked in What is profit or loss percentage?
Formula for cost price 
Bindhu Vashini's image