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)
Q4 2023 gross margin
=hf_Gross_Margin("MSFT", "ly")
Last year gross margin
=hf_Gross_Margin("GOOGL", 2023, , "TTM")
TTM gross margin
=hf_Gross_Margin("AAPL", 2023)*100
Convert to percentage (45%)

When 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.

Get Access to 1 Billion Usable Market data points IN YOUR EXCEL SHEETS WITH EASY TO USE EXCEL FUNCTIONS

Get started today
MarketXLS Excel Add-in Tutorial - How to Use Gross Margin (Historical) and Other Financial Formulas
How does MarketXLS work?