Budget vs Actual Analysis from Document Extraction
Extract actual spend data from invoices, statements, and financial reports, then compare against budget automatically. Build variance reports that surface problems before they compound.
The budget vs actual gap
Every organization sets a budget. Far fewer organizations compare actual results against that budget with any rigor until the quarter is already over.
The reason is not lack of intent. Controllers and FP&A teams know that budget-to-actual variance analysis is one of the most important financial controls. Catching a cost overrun in month one of a quarter gives you two months to correct course. Catching it at quarter-end gives you a post-mortem and a missed target.
The reason is logistics. Actual spend data does not arrive in a single, clean report. It is scattered across hundreds of invoices from dozens of vendors, credit card statements from multiple cardholders, payroll reports, utility bills, subscription confirmations, lease payment notices, and internal cost allocation schedules. Each document is in a different format, from a different source, covering a different time period. Pulling all of that together into a single "actuals" view and mapping it against budget line items is a manual assembly job that takes days.
By the time the analysis is done, the period is over and the insights are stale. Finance teams end up doing thorough variance analysis at quarter-end for reporting purposes, while operating with only rough estimates during the quarter -- precisely when detailed variance data would be most actionable.
Where actual spend data lives
Understanding the budget-to-actual challenge requires understanding where actual data originates. It is not in the general ledger, at least not in a timely or complete form. The GL reflects posted transactions, but many costs lag their economic occurrence by weeks due to invoice processing time, accrual adjustments, and posting delays.
The source documents that contain real-time actual spend include:
Vendor invoices. The most voluminous source. Each invoice represents a specific cost -- materials, services, subscriptions -- with vendor, amount, date, and description embedded in a PDF.
Credit card statements. Monthly statements with every charge needing category coding. Restaurants are T&E. Software charges are IT. Office supplies are admin.
Payroll reports. Typically the largest budget category. Gross wages, benefits, taxes, and employer contributions by department, delivered as PDF summaries.
Bank statements. Recurring debits for rent, insurance, and loan payments. Confirms actual amounts and dates for fixed costs.
Utility, telecom, and SaaS invoices. Monthly bills that may fluctuate with usage. Individually modest but collectively significant.
Internal allocations. Shared service costs distributed across departments via internal documents or spreadsheets.
A typical mid-size company might have 300-500 of these documents per month, each containing a piece of the actual spend picture. Assembling them into a coherent dataset is the bottleneck.
Extracting actuals from source documents
The first step in budget-to-actual analysis is turning those hundreds of documents into structured data. This is a document extraction problem with specific requirements for financial analysis.
Amount extraction with precision. Financial documents contain many numbers -- subtotals, tax amounts, discounts, previous balances, payment amounts. The extraction must identify the correct figure for budget comparison. For an invoice, that is typically the total amount due. For a credit card statement, it is each individual line item. For a payroll report, it might be departmental subtotals.
Date normalization. Budget periods are fixed (monthly, quarterly). Every extracted actual must be assigned to the correct period. An invoice dated June 28 for services rendered in June belongs in June, even if paid in July. The extraction needs to capture service dates or invoice dates and map them to budget periods.
Category inference. Each extracted amount needs to map to a budget category. A vendor invoice from a janitorial service maps to "Facilities -- Cleaning." A charge from AWS maps to "IT -- Cloud Infrastructure." This mapping can be inferred from vendor name, line item description, GL account codes on the invoice, or historical patterns.
Vendor identification. Consistent vendor naming across documents enables aggregation. "Amazon Web Services," "AWS," and "AMZN Web Svcs" are the same vendor. Normalizing these during extraction prevents duplicate budget lines.
docrew handles this extraction by reading each source document locally, identifying the relevant financial data, and producing a structured output with amount, date, vendor, description, and suggested category for each cost item.
Mapping extracted data to budget categories
Raw extraction gives you a list of actual costs. Mapping those costs to your specific budget structure is the next critical step.
Budget structures vary by organization. A simple departmental budget might have 20 line items: salaries, benefits, rent, utilities, supplies, travel, software, consulting, and so on. A detailed operating budget might have 200 line items broken down by department, project, and cost type.
The mapping process works in layers:
Direct vendor mapping. Many vendors always map to the same category. Your landlord is always "Rent." Your payroll provider is always "Salaries and Wages." These one-to-one mappings cover predictable recurring costs.
Description-based mapping. For vendors that supply multiple cost types, line item descriptions determine the category. A general contractor might invoice for both "Building Maintenance" and "Office Renovation" -- the description distinguishes them.
GL account mapping. If invoices carry GL account codes, those codes map directly to budget categories. This is common in larger organizations with structured chart-of-accounts coding.
Historical pattern matching. For ambiguous items, previous period mappings provide guidance. If last month's charge from a vendor was coded to "Marketing -- Events," this month's charge from the same vendor likely maps the same way.
docrew applies these rules in sequence. You provide your budget structure and known vendor-to-category mappings. The agent maps what it can deterministically and flags ambiguous items for review. After a few months, mapping accuracy improves as the historical pattern library grows.
Variance analysis: amount and percentage
With actuals mapped to budget categories, variance analysis becomes arithmetic -- but meaningful arithmetic.
Dollar variance. Budget minus actual. Positive means underspend, negative means overspend. Simple and intuitive for line-item review.
Percentage variance. Dollar variance divided by budget. A $5,000 overspend on a $500,000 salary line is 1% and probably fine. The same $5,000 on a $10,000 consulting line is 50% and needs immediate attention.
Year-to-date cumulative variance. Monthly variances can be noisy due to timing. The cumulative YTD view smooths this noise. If March travel is $8,000 over but YTD is $2,000 under, the spike is a timing issue, not structural.
Run-rate projection. Annualize actual spend through the current month and compare against the full-year budget. If Q1 actuals represent 30% of annual budget instead of the expected 25%, projected full-year spend exceeds budget by 20%. This early warning is the entire point of monthly analysis.
Materiality filtering. Not every variance warrants investigation. The analysis should filter by materiality thresholds -- both absolute and relative -- to produce an actionable exception list rather than a wall of numbers.
Trend identification and forecasting
Single-period variance analysis tells you where you stand. Multi-period trend analysis tells you where you are heading.
When docrew processes three or more months of source documents, it can identify patterns that single-period analysis misses.
Accelerating costs. A vendor's monthly invoice has grown from $8,000 to $9,200 to $10,800 over three months. The monthly variance report shows a small overspend each month. The trend reveals a 15% month-over-month growth rate that will blow the annual budget by Q3 if unchecked.
Seasonal patterns. Utility costs spike in summer and winter. Travel peaks around conferences in Q2 and Q4. Recognizing these patterns prevents false alarms and highlights genuine anomalies.
One-time vs recurring variances. A $25,000 legal bill in March is a one-time event. A $25,000 monthly increase in cloud costs is structural. Trend analysis distinguishes the two -- one-time items are excluded from run-rate projections while structural changes are incorporated.
Vendor price drift. When the same vendor provides the same service each month, amount changes reflect price increases or scope changes. Tracking vendor-level spend surfaces drift that accumulates to meaningful budget impact over a year.
These trend insights transform budget-to-actual analysis from a backward-looking compliance exercise into a forward-looking management tool.
The docrew workflow
Here is how docrew automates the entire budget-to-actual process, from document collection to variance report.
Set up the budget baseline. Provide your approved budget as a spreadsheet or PDF. The agent extracts the budget structure: categories, monthly or quarterly amounts, annual totals. This is a one-time setup that persists across analysis periods.
Collect period documents. At the end of each month, gather all source documents for the period into a folder: invoices, statements, payroll reports, allocation schedules. The same documents your team already collects for posting and payment processing.
Run the extraction and analysis. Tell the agent: "Process all documents in the June folder. Extract actual costs, map to the 2026 operating budget, and produce a variance report with YTD cumulative and full-year projection."
The agent reads every document locally. It extracts amounts, dates, vendors, and descriptions. It maps each item to a budget category using the established mapping rules. It calculates dollar and percentage variances for the month, YTD, and projected full year. It identifies trends across available months. It flags material variances that exceed your defined thresholds.
Review the output. The agent produces a multi-section variance report:
- Executive summary: total budget, total actual, total variance, top five overspend categories, top five underspend categories.
- Detailed variance by category: each budget line item with budget, actual, dollar variance, percentage variance, YTD cumulative, and full-year projection.
- Trend alerts: categories with accelerating cost growth, vendor price drift, or anomalous patterns.
- Unmapped items: costs that the agent could not confidently assign to a budget category, listed for manual review.
- Source detail: every extracted cost item with its source document reference, enabling drill-down from a variance to the specific invoice or statement that caused it.
All of this runs locally. Your financial documents, your budget, and your variance reports stay on your machine.
Practical scenario: quarterly department review
A technology company with 150 employees runs quarterly budget reviews with each department head. The FP&A team needs to prepare variance packages for eight departments, each with 15-25 budget line items, covering three months of activity.
Before docrew. The FP&A analyst pulls GL detail for each department, cross-references source documents for major variances, calculates variances in a spreadsheet template, writes commentary, and assembles the package. Preparing all eight departments takes three to four days. By the time reviews happen in week two, the data is stale.
With docrew. The analyst collects each department's source documents into department-specific folders and runs the analysis. The agent processes documents, maps to departmental budgets, and produces a variance report per department.
Total processing time: approximately two hours of automated extraction and analysis, plus two hours of human review and commentary. Half a day instead of four days.
Each department head receives a package with source document references for every material variance. When the VP of Engineering asks why cloud computing was $18,000 over budget, the analyst can point to three specific AWS invoices showing a usage spike from product launch load testing. The conversation moves from "what happened" to "what should we do about it."
Building a continuous monitoring practice
The real power of automated budget-to-actual analysis is frequency. When the analysis takes days, you do it quarterly. When it takes hours, you can do it weekly. When it takes minutes, you run it continuously as documents arrive.
Imagine receiving your variance report every Friday instead of every quarter. The cloud computing overspend that would have been a $54,000 surprise at quarter-end is caught in week one as an $18,000 variance with two months to address it. This cadence transforms budget management from a reporting function into a control function.
Getting started
If your team struggles with timely budget-to-actual reporting, begin with the most painful department.
- Export or scan your approved budget for that department into a file.
- Collect one month of source documents -- invoices, statements, payroll summaries -- into a folder.
- Tell the docrew agent to extract actuals and compare against budget.
- Review the variance report. Check the category mappings. Verify the calculations against a few items you know well.
- Refine the category mappings and materiality thresholds based on what you see.
By the second month, mappings are more accurate and the review is faster. By the third month, you have trend data and projections. Expand to additional departments as confidence grows. Within a quarter, you will have a budget monitoring practice that runs in hours instead of days and delivers insights while they are still actionable.