Profit is a percentage of the cost to you. $profit = $takehome + (100*$percentage); 112.7 = 100 + (100 * .127) Markup is a percentage of the selling price. $markup = $takehome / (1- $percentage); 114.5475 = 100 / (1 - .127)