Gross Profit Margin (Historical)
Returns the historical gross profit margin, which measures the percentage of revenue remaining after deducting the cost of goods sold (COGS).
Understanding the Metric
Gross profit margin is calculated as:
Gross Margin = (Revenue - COGS) / Revenue * 100This metric shows:
- Pricing power and product profitability
- Efficiency in production/procurement
- How much profit is available to cover operating expenses
Higher margins generally indicate stronger competitive position.
Parameters
| Parameter | Description |
|---|---|
| Symbol | Stock ticker (e.g., AAPL, MSFT) |
| Year | Fiscal year or period code (lq, ly, lq-1, ly-1, lt, lt-1) |
| Quarter | Optional: 1, 2, 3, or 4 (default: 1) |
| TTM | Optional: "TTM" for trailing twelve months |
Industry Benchmarks
| Sector | Typical Gross Margin |
|---|---|
| Software | 70-85% |
| Retail | 20-40% |
| Manufacturing | 25-45% |
| Consumer Goods | 40-60% |
Examples
=hf_Gross_profit_margin_profit_margin_after_CGS("AAPL", 2023, 4)=hf_Gross_profit_margin_profit_margin_after_CGS("MSFT", "ly")=hf_Gross_profit_margin_profit_margin_after_CGS("WMT", 2023, , "TTM")=hf_Gross_profit_margin_profit_margin_after_CGS(A1, B1, C1)=hf_Gross_profit_margin_profit_margin_after_CGS("COST", "lq")When to Use
- Analyzing product/service profitability
- Comparing companies within an industry
- Tracking margin trends over time
- Evaluating pricing power
- Assessing competitive position
When NOT to Use
| Scenario | Use Instead |
|---|---|
| Need operating margin | Check operating margin functions |
| Need pre-tax margin | hf_Pre_Tax_Profit_Margin() |
| Need net profit margin | hf_Post_Tax_Profit_Margin() |
| Need gross profit amount | hf_Gross_Profit() |
Common Issues & FAQ
Q: Why is gross margin so different across industries? A: Business models vary dramatically. Software companies have near-zero marginal costs (high margins), while retailers sell physical goods with significant COGS (lower margins).
Q: What's a good gross margin? A: It depends on the industry. Compare to sector peers, not across sectors. Within tech, 70%+ is strong. Within retail, 25%+ is good.
Q: Why might gross margin decline? A: Common reasons include rising input costs, pricing pressure, product mix shift toward lower-margin products, or promotional activity.
