As Professor David Eugene Booth noticed, the first step to take is specifying the question. Then, you have to find a suitable design or method. Finally, calculating the sample size in accordance with the founded method is done.
The formula looks like this when it determines the profit for a bigger number of items:
Total profit = revenue - total cost
Or stated differently
Total profit = (unit price x quantity) – (unit cost x quantity)
According to the formulas I wrote, you must also have cost data. Or do you mean the profit of the goods is something else?
Or are you looking to get the fourth variable from the three available variables according to the predictive statistics? This part needs more elaboration.