Margin
Margin is profit as a share of the sale price. Sell something for $100 and keep $30, and your margin is 30%.
It tells you how much cushion you have. A 40% margin can absorb a big rise in material prices before it becomes a loss; a 4% margin cannot. Use margin to judge how risky a production line is, not how good it is — a high margin on a product that barely sells is worth less than a thin margin on something that moves constantly.
Return on investment (ROI)
ROI compares what you got back against what you put in. Spend $100,000 on a building that earns you $30,000 over a month, and the ROI for that month is 30%.
It is the right tool for comparing things that cost different amounts. A building that earns $500 a day on $1,000,000 is worse than one earning $100 a day on $50,000, even though the first number is bigger.
Payback period
Payback is simply how long until an investment has earned back what it cost. A $100,000 building earning $500 an hour pays back in 200 hours.
This is usually the most useful of the three for building decisions, because it is intuitive and it captures risk: a building that pays back in three days is a small bet, and one that pays back in four months is a commitment to prices staying roughly where they are.
Which to use when
Deciding what to produce? Profit per hour, with margin as a risk check.
Deciding whether to build or upgrade? Payback period first, ROI to compare against alternatives.
Deciding between two very different-sized investments? ROI, or profit per hour per dollar of capital.