Gross Margin (Historical)
Returns the historical gross margin (gross profit margin) for a company. This ratio measures the percentage of revenue remaining after cost of goods sold.
Formula
Gross Margin = (Revenue - Cost of Revenue) / Revenue = Gross Profit / Revenue
Parameters
| Parameter | Required | Description |
|---|---|---|
| Symbol | Yes | Stock ticker symbol |
| Year | Yes | Fiscal year or period code |
| Quarter | No | Quarter 1-4 |
| TTM | No | "TTM" for trailing twelve months |
Return Value
- Returns as decimal (0.45 = 45%)
- Higher values indicate better pricing power
Examples
=hf_Gross_Margin("AAPL", 2023, 4)=hf_Gross_Margin("MSFT", "ly")=hf_Gross_Margin("GOOGL", 2023, , "TTM")=hf_Gross_Margin("AAPL", 2023)*100When to Use
- Analyzing pricing power
- Comparing profitability across companies
- Tracking margin trends
- Industry benchmarking
When NOT to Use
| Scenario | Use Instead |
|---|---|
| Operating margin | hf_Operating_Margin() |
| Net profit margin | hf_Profit_Margin() |
| Gross profit amount | hf_Gross_Profit() |
Common Issues & FAQ
Q: Why is the value less than 1? A: Gross margin is returned as a decimal. Multiply by 100 for percentage.
Q: Why do software companies have high gross margins? A: Software has minimal cost of goods sold compared to physical products.
