Have a separate input for cost and selling price .From there an automation generated profit after every complete sale.