CP can be calculated with the help of the formulas given below.
CP (selling price) when profit% and selling price are given:
CP = {100/(100 + P%)} x SP
CP (selling price) when loss% and selling price are given:
CP = {100/(100 – L%)} x SP