Back to Functions
XO.PROFIT
Get Net Income (Profit/Loss) from the P&L report for a date range. Returns the bottom line from your Profit & Loss statement. Optionally filter by tracking categories.
Syntax
=XO.PROFIT(org_id, start_date, end_date, [category1], [option1], [category2], [option2])
Parameters
| Parameter | Required | Description |
|---|---|---|
| org_id | Yes | Organization ID from XO.ORG() |
| start_date | Yes | Period start date |
| end_date | Yes | Period end date |
| category1 | No | First tracking category name |
| option1 | No | First tracking option |
| category2 | No | Second tracking category name |
| option2 | No | Second tracking option |
Returns
- Positive number = Profit (revenue exceeds expenses)
- Negative number = Loss (expenses exceed revenue)
- Zero = Break-even
Examples
Total profit for period:
=XO.PROFIT(A2, C1, D1)Profit by region:
=XO.PROFIT($A$2, C1, D1, "Region", "North")Profit by region and department:
=XO.PROFIT(A2, C1, D1, "Region", "North", "Department", "Sales")Use Cases
Dashboard KPIs
Monthly Profit: =XO.PROFIT(A2, DATE(2025,1,1), DATE(2025,1,31))YTD Profit: =XO.PROFIT(A2, DATE(2025,1,1), TODAY())Profit Margin Calculation
Revenue: =XO.BALANCE(A2, "4000", C1, D1)Profit: =XO.PROFIT(A2, C1, D1)Margin %: =B3/B2*100