Gross Margin (Marx) = gross profits (sales minus cost of goods sold) / total assets (depreciation deducted)
Robert Novy-Marx in a paper The Quality Dimension of Value Investing defined a quality company as one that had a high gross income ratio.
In the paper Robert showed that this ratio has the same market beating capability as other valuation ratios such as the price to earnings ratio for example.
Read more here
Read more about the Novy-Marx high gross income ratio here: Have you been using the wrong quality ratio?