Gross Profit (Historical)
Returns historical gross profit for a company. Gross profit is the profit remaining after subtracting the cost of revenue from total revenue.
What is Gross Profit?
Gross Profit = Revenue - Cost of Revenue
It measures how efficiently a company produces its goods or services before accounting for operating expenses, interest, and taxes.
Parameters
| Parameter | Required | Description |
|---|---|---|
| Symbol | Yes | Stock ticker symbol |
| Year | Yes | Fiscal year (e.g., 2023) or period code (lq, ly) |
| Quarter | No | Quarter number 1-4 (default: 1) |
| TTM | No | Set to "TTM" for trailing twelve months |
Period Codes
| Code | Meaning |
|---|---|
| lq | Last quarter |
| lq-1 | Two quarters ago |
| ly | Last year |
| ly-1 | Two years ago |
Syntax
=hf_Gross_Profit(Symbol, Year, [Quarter], [TTM])Parameters
Stock ticker symbol
Fiscal year or period code
Calendar quarter (1-4)
Set to 'TTM' for trailing twelve months
Returns
Gross profit value
Examples
=hf_Gross_Profit("AAPL", "2023", "4")=hf_Gross_Profit("MSFT", "2023", "3")=hf_Gross_Profit("AAPL", "lq")=hf_Gross_Profit("GOOGL", "2023", "4", "TTM")=hf_Gross_Profit(A1, B1, C1)When to Use
- Analyzing profitability trends
- Calculating gross margin
- Building financial models
- Comparing operational efficiency
- Evaluating pricing power
When NOT to Use
| Scenario | Use Instead |
|---|---|
| Need current gross profit | GrossProfit() |
| Need gross margin % | GrossMargin() |
| Need operating profit | hf_Operating_Income() |
| Need EBIT | hf_Earning_Before_Interest_and_Taxes() |
| Need net income | hf_Net_Income() |
Common Issues & FAQ
Why am I getting "NA"?
Check that:
- The symbol is valid and has fundamental data available
- The year/quarter combination exists in the data
- The company has reported financials for that period
How do I calculate gross margin percentage?
Divide gross profit by revenue:
=hf_Gross_Profit("AAPL", "2023", "4") / hf_Revenue("AAPL", "2023", "4")
What's the difference between gross profit and operating income?
Operating income = Gross Profit - Operating Expenses (SG&A, R&D, etc.)
Excel Templates Using Gross Profit (Historical)
These ready-made MarketXLS templates call hf_Gross_Profit() in their worksheet formulas. Open one to see the function working inside a complete model.
Related Formulas
More MarketXLS Historical Fundamentals formulas you can use in the same worksheet:
- Gross Profit Indicator (Historical)
- Gross Profit Margin (Historical)
- Hf Auditors Name Aud Name And Aud Op
- Hf Auditors Report Aud Name And Aud Op
- Hf Basic Eps From Continuing Operations
- Hf Basic Eps From Cumulative Effect Of Accounting Chg
- Hf Basic Eps From Discontinued Operations
- Hf Basic Eps From Extraordinary Income
