Skip to main content

Free for 14 days · from $9.90/mo

See plans
Only in ExcelGoogle Sheets has no custom formulas. Use tables and reports there.
Back to Functions

XO.BUDGET

Get budget amount for an account over a date range. Use for variance analysis (Actual vs Budget).

Syntax

=XO.BUDGET(org_id, budget_name, account, start_date, end_date)

Parameters

ParameterRequiredDescription
org_idYesOrganization ID from XO.ORG()
budget_nameYesBudget name as defined in Xero (e.g., "FY2024 Budget")
accountYesGL account code (must be P&L account)
start_dateYesPeriod start date. Must be a cell reference containing a date (e.g., C1) or an Excel serial date number. Typed text dates like '2024-01-01' will cause an error.
end_dateYesPeriod end date. Must be a cell reference containing a date (e.g., D1) or an Excel serial date number. This ensures dates work correctly across all locale settings.

Budget Types in Xero

  • OVERALL budgets - Company-wide budgets (e.g., "FY2024 Budget", "FY2025 Forecast")
  • TRACKING budgets - Per-region or per-department budgets (e.g., "FY2024 North Region")

Note: Xero budgets only apply to P&L accounts (Revenue and Expense). Balance Sheet accounts do not support budgets.

Need a different budget?

The Budget Summary report only shows your Overall Budget. The =XO.BUDGET() formula can pull any budget you've set up in Xero: your Overall Budget, a separate forecast, or a budget for a specific team or region. Just type the budget's name exactly as it appears in Xero.

Examples

Overall company budget:

=XO.BUDGET(A2, "Overall Budget", "4000", C1, D1)

Gets the budget amount for account 4000 from the Overall Budget.

$95,000

Tracking budget by region:

=XO.BUDGET(A2, "FY2024 North Region", "4000", C1, D1)

Variance Analysis Example

Start this table at A1. Put the Org ID in F1, the start date in F2, and the end date in F3, outside the table.

AccountActualBudgetVariance
4000=XO.BALANCE($F$1,"4000",$F$2,$F$3)=XO.BUDGET($F$1,"Overall Budget","4000",$F$2,$F$3)=B2-C2
6200=XO.BALANCE($F$1,"6200",$F$2,$F$3)=XO.BUDGET($F$1,"Overall Budget","6200",$F$2,$F$3)=B3-C3

How It Works

  • XO.BUDGET fetches the named budget from Xero and returns the total for the specified account within the date range
  • For tracking-category budgets, both dates are required to retrieve budget periods
  • Budget amounts are summed across all months touched by the specified date range, without prorating partial months

Errors

  • Budget not found: Returns #VALUE! if the budget name doesn't exist in Xero
  • No data: Returns 0 if the account has no budget amount in the specified period
  • Partial months: A date range within a month returns that whole month's budget

Troubleshooting

If you see an error, check the troubleshooting guide. XO Report shows standard Excel errors (#VALUE!, #N/A) for connection and data problems. To show a blank or your own message instead of an error, wrap the formula in IFERROR. Hover over the cell to see the specific message.

For a complete overview of building Xero reports in Excel, including how this function fits into a full workflow, see our complete Xero to Excel guide.

Related Functions