To analyze a Xero profit and loss with AI, connect Claude or ChatGPT to Xero through DeepLedger's MCP server, run two profit and loss reports with explicit dates on the same basis, check the arithmetic, then trace each material change to the invoices, bills, bank transactions and manual journals behind it. Ask for the evidence behind every explanation. A tidy summary helps only when the figures and report settings agree with Xero.
This guide is for accountants, bookkeepers and owners who review monthly results in Xero. The prompts work in any AI app connected to DeepLedger, including Grok.
The guide uses placeholders rather than figures. We did not run it against a customer's books, and we have not published demo results for Xero, so every number you work with comes from your own organisation.
What do you need before asking AI about a Xero profit and loss?
If your AI app is not connected yet, follow Connect Claude to Xero or Connect ChatGPT to Xero. Both add the same address:
https://mcp.deepledger.ai/mcp
Before you ask why profit moved, write down what you are comparing:
| Setting | What to decide |
|---|---|
| Xero organisation | The exact name, confirmed in the chat |
| Base currency | Read from the organisation profile |
| Earlier period | A complete month, such as September 1 to 30, 2026 |
| Later period | The month under review, such as October 1 to 31, 2026 |
| Basis | Accrual for both, or cash for both |
| Tracking | Whole organisation, or one tracking category split |
| Layout | The organisation's own report layout, or Xero's standard one |
Two Xero points matter here. First, cash basis in DeepLedger means the report runs on payments only. Second, drafts are not in the report. DeepLedger saves new invoices, bills, credit notes and manual journals as drafts unless someone asks to approve them, so a month can look light while approved work is still waiting.
If the client keeps accounting policies in DeepLedger's AI Brain, such as a capitalisation threshold for equipment, ask the AI to read them first. It can then say whether a large expense line follows the client's own policy. The AI reads the AI Brain when you ask, not automatically.
Which prompt should I use for a Xero profit and loss analysis?
Copy this and replace the organisation and periods:
Use DeepLedger for a read-only profit and loss review. Do not create
or change records.
First show the active Xero organisation and base currency. If it is
not the one I named, stop and ask. Read the organisation's AI Brain
accounting policies.
Run the profit and loss for September 1 to 30, 2026 and October 1 to
31, 2026, both on the accrual basis, for the whole organisation. State
the settings you used. If either report fails, say so before drawing
any conclusion.
Compare income, cost of sales, gross profit, operating expenses and
net profit. Show October minus September in currency. Do not work out
a percentage change from a zero or negative base.
For each material change, list the invoices, bills, credit notes,
spend and receive money transactions and manual journals behind it,
with dates, numbers or references, accounts and amounts. Retrieve
every page. Separate what the records show from explanations that need
more evidence. Also list any draft invoices, bills or journals dated
in October. Finish with questions for me, not journals to post.
DeepLedger runs this with its Xero report tool, which can also add comparison columns by month, quarter or year, and split the report by one tracking category. Transaction search reads invoices, bills, credit notes, payments, bank transactions, transfers and manual journals, and each row carries its lines with account and tax codes.
How do I check the AI's profit and loss totals?
Check the arithmetic before you read the explanation. In Xero's standard layout, these must hold for each period:
- Gross profit equals income minus cost of sales.
- Net profit equals gross profit plus other income, minus operating expenses and any other expense sections the report shows.
- The change in net profit equals the sum of the changes in each section, with expenses taken away.
If any line fails, ask the AI to show the section totals it used. A missing section is the most common cause.
Then compare with Xero itself. Open Reporting → All reports → Profit and Loss, set the same organisation, dates, basis and tracking, and compare section by section. If the organisation uses a custom report layout, the AI can run Xero's standard layout instead; compare like with like.
Do not describe a change as a percentage when the earlier figure is zero or negative. Show the currency change and label the percentage not meaningful.
How do I trace a Xero profit and loss change to transactions?
Xero's general ledger report is not available to DeepLedger yet: it needs a Xero permission that Xero must approve for the app first. The AI traces each account through transaction search instead, then checks account balances with the trial balance.
| Where the change shows | Where the AI looks | What to confirm |
|---|---|---|
| Sales income | Approved invoices and customer credit notes in the period | Dates, accounts and credits issued after the sale |
| Cost of sales and direct costs | Approved bills and supplier credit notes | Bills coded to the right account and period |
| Card and bank costs | Spend money transactions | Purchases that also have a bill, which would count twice |
| Other income | Receive money transactions | Money that should have been a payment against an invoice |
| Accruals, depreciation and corrections | Manual journals | The narration and the supporting calculation |
| Regional or divisional moves | The same records, split by tracking category | Lines with no tracking option set |
A matching entry explains the number, not the business reason. A manual journal for a wages accrual shows that the accrual is in the books. It does not prove the wages were paid or that the accrual was approved.
To cross-check the balance side, ask for the balance sheet and trial balance at each period end. When both dates fall in the same financial year, the change in current year earnings should equal the later month's net profit:
Run the balance sheet and trial balance as at September 30 and October 31, 2026. Tell me whether the change in current year earnings on the balance sheet agrees with October's net profit, and list the accounts that moved most.
What should the AI hand back?
A useful final answer says what is known and what still needs support:
- Which changes are explained by records, with the Xero numbers or references.
- Which changes need a document, such as a supplier invoice or payroll summary.
- Draft invoices, bills or journals dated in the period that are not yet in the report.
- Bank accounts with unreconciled items, which may mean the month is not complete.
- Lines coded to a general or suspense account that need a better account.
Ask the AI to turn each open question into a DeepLedger task, so it appears on the company's Tasks tab for the person who can answer it. Carry the same questions into the Xero month-end close checklist. If you run the close in DeepLedger's Month-end close, the AI prepares the checks and a person signs off the period.
Troubleshooting
The AI's totals differ from Xero. Compare organisation, dates, basis, tracking and layout first. Then ask whether anything was approved or changed after the AI ran the report.
The AI quotes a growth percentage from a zero or negative month. The base makes the percentage meaningless. Ask for the currency change and a "not meaningful" label instead.
The AI analyzed the wrong organisation. Your active company is shared across your connected AI apps, so another session may have switched it. Ask which company you are in, switch by name and rerun both reports.
A request needs the general ledger. DeepLedger says so when a request needs it. Use transaction search by account and the trial balance until the Xero permission is approved.
Reports fail with a reconnect message. That organisation's Xero authorisation has lapsed. An admin reconnects it from the company's Connections tab. More fixes are in Xero MCP troubleshooting.
Frequently asked questions
Can Claude or ChatGPT analyze a Xero profit and loss?
Yes. Connected to Xero through DeepLedger, Claude or ChatGPT runs the Xero profit and loss for the dates and basis you give, compares periods and traces changes through invoices, bills, bank transactions and manual journals. Confirm the organisation, currency, dates and basis, then check the totals against the same report in Xero.
Why might the AI's Xero totals differ from Xero?
The usual causes are a different organisation, date range, cash or accrual basis, tracking filter or report layout. Records approved or changed since the AI ran the report also cause differences. Resolve the difference before you rely on the explanation.
Can the AI use the general ledger report in Xero?
Not yet. The general ledger report needs a Xero permission that Xero must approve for DeepLedger first. Until then, the AI traces changes with transaction search and checks account balances with the trial balance.
Do draft invoices and bills show on the Xero profit and loss?
No. Drafts do not affect Xero's reports until someone approves them. DeepLedger saves new invoices, bills, credit notes and manual journals as drafts by default, so ask the AI to list open drafts in the period before you treat a month as complete.
Does a read-only prompt stop the AI from changing Xero?
No. A prompt that says do not change records states your intent, but the connection can still offer write tools. Use your AI app's tool permissions where it has them, or ask an admin to make you a read-only member in DeepLedger.
Is an AI profit and loss analysis a review of the books?
No. The analysis explains what the reports show and lists questions to review. It does not certify the books, reconcile bank accounts or approve adjusting journals; a person does that.
Related guides
- Xero MCP server guide
- Xero month-end close checklist
- 5 Grok prompts for Xero
- The QuickBooks Online version: analyze a profit and loss with AI
Find every AI app DeepLedger works with on AI Platforms & Integrations.