Cloud cost forecasting
How to forecast your cloud bill before the month ends
To forecast your month-end cloud bill accurately, you can't just take today's total and extrapolate it. Cloud providers report cost data on a delay of 8 to 24 hours, and built-in forecasting tools rely on historical averages with an 80% prediction interval that often misses sudden usage surges.
If you run infrastructure on AWS, Azure, or Google Cloud, you need to combine run-rate calculations with provider forecast alerts and real-time monitoring so you aren't blindsided by an unexpected invoice on the first of the month.
The simple run-rate math (and why it fails)
The fastest way to guess your month-end bill is basic linear math. You take your month-to-date spend, divide it by the number of days that have passed, and multiply that daily average by the total number of days in the month.
It's quick, but it rarely matches the invoice.
The biggest flaw is that provider reporting pipelines run behind your live infrastructure. AWS Cost Explorer, for instance, only shows charges up to the previous day; if today is December 2, your dashboard only includes usage through December 1. If you want more details on why that happens, read Why doesn't AWS Cost Explorer show today's spend yet, and how current is its data?.
On Azure, usage data typically takes 8 to 24 hours for Enterprise Agreement and Microsoft Customer Agreement accounts, but pay-as-you-go subscriptions can lag by up to 72 hours. Google Cloud has similar reporting delays, which is why a monthly Cloud Billing budget keeps tracking costs through the first two days of the following month (an August budget watches costs through September 2).
Because your input data is already a day or two old, a sudden spike in traffic or an unclosed database snapshot won't show up in your manual run rate until significant money has already burned.
How AWS Cost Explorer forecasts your spend
In AWS Cost Explorer, you create a forecast by selecting a future time range for your report. The tool builds a prediction of how much you'll use AWS services over that selected period based on your past usage.
AWS uses an 80% prediction interval for these projections. If your account doesn't have enough historical data to calculate that 80% interval, Cost Explorer won't give you a forecast at all. That happens often on new accounts that have less than one full billing cycle.
The prediction band widens or narrows depending on how consistent your spend has been historically. If your daily spend fluctuates wildly, the forecast range gets much wider; if your spend is steady, the prediction band stays tight. In an official AWS example, an account with a 100-dollar monthly budget might show a forecast between 90 and 100 dollars, with a mean of 95 dollars.
Cost Explorer Chart Displays:
- Line charts: 80% interval shown as lines on either side of your cost line
- Bar charts: 80% interval shown as two lines on either side of the top of the barDiscounts are included by default when AWS forecasts costs, but refunds are not included in month-to-date or forecasted month-end metrics. If you want your forecast to account for non-recurring discounts like refunds, AWS recommends setting your view to "Show net unblended costs".
You can also use Amazon Q Developer inside Cost Explorer to get explanations for spending trajectories. Just set a future date range, click "Analyze with Amazon Q", or use the "Ask question" button.
Viewing these forecasts in the Cost Explorer user interface is free. But if you query the Cost Explorer API programmatically, each paginated request costs $0.01 against your primary billing view.
Azure Cost Management: forecast views and budget alerts
In the Azure portal, you find forecast charts by navigating to Cost Management + Billing > Cost Management > Cost Analysis. Forecasts appear on area and stacked column charts, where your actual or amortized spend shows up in a solid color and the projected cost shows in a shaded color.
There is a catch when slicing your data. If you group your costs by "Service name", Azure doesn't calculate a forecast for each individual service; it only projects a single total across all services. If you need a forecast for one specific service like virtual machines, you have to add a filter for "Service name", add a second filter for "Meter", and group by "Resource". Even then, Azure calculates the forecast for the total of those resources rather than per service.
Azure lets you configure budget alerts based on either actual cost or forecasted cost, which helps you catch overages before they happen. Budget alert limits can be set between 0.01% and 1000% of the target threshold, and budgets are evaluated against your costs every 24 hours.
When an Azure forecast threshold is crossed, notifications are usually sent within an hour of the evaluation from azure-noreply@microsoft.com. For a deeper breakdown of how these notifications work, see How do I set up Azure budget and cost alerts, and why do they fire late?.
If you automate your Azure infrastructure, don't use the Azure PowerShell module (New-AzConsumptionBudget) to build budgets, because Microsoft notes that budgets created with PowerShell don't send notifications. Use the Budgets REST API or the Azure CLI instead:
az consumption budget create-with-rg --amount 100 --budget-name TestCLIBudget -g $rg --category Cost --time-grain Monthly --time-period '{"start-date":"2024-06-01","end-date":"2025-12-31"}' --notifications "{\"Key1\":{\"enabled\":\"true\", \"operator\":\"GreaterThanOrEqualTo\", \"contact-emails\":[], \"threshold\":80.0, \"contact-groups\":[\"$ActionGroupId\"]}}"Google Cloud: forecasted budget thresholds and Pub/Sub
Google Cloud Billing budgets run on calendar periods (monthly, quarterly, yearly) or custom date ranges, with monthly as the default. All calendar dates reset at 12 AM US and Canadian Pacific Time (UTC-8).
When you set up threshold rules on a Google Cloud budget, you can trigger them against Actual spend (accrued cost) or Forecasted spend (estimated cost out to the end of the period). The default rules trigger at 50%, 90%, and 100% of the budget on Actual spend, so you have to explicitly choose Forecasted spend if you want predictive alerts.
One big limitation: Cloud Billing budgets configured for a custom time range cannot trigger alerts on Forecasted costs. Forecasted alerts only work on recurring calendar ranges.
To send alerts to engineering chat channels, connect your budget to a Google Cloud Pub/Sub topic. Programmatic notifications publish to the topic multiple times per day with your current budget status, unlike email alerts which only send when a threshold is crossed. For wiring instructions, read How do I set up Google Cloud budget alerts that reach me in time? and How do I send cloud billing alerts to Slack or Discord?.
If you want the Pub/Sub JSON payload to include alertThresholdExceeded and forecastThresholdExceeded, you must have at least one alert threshold rule configured and at least one email recipient enabled. Both fields output the exceeded threshold as a decimal, so an exceeded 90% threshold shows up as 0.9.
Provider forecast engines compared
Every major cloud handles projections slightly differently, and their native alerts run on different refresh cadences.
| Feature | AWS Cost Explorer | Azure Cost Management | Google Cloud Billing |
|---|---|---|---|
| Prediction method | Past usage trends, 80% prediction interval | Historical resource usage | Projected spend to end of calendar period |
| Minimum data needed | Up to 1 full billing cycle | Up to 48 hours for new subscriptions | Needs calendar period (not custom range) |
| Data reporting delay | Up to 24 hours (shows through yesterday) | 8 to 24 hours (EA/MCA), up to 72 hours (pay-as-you-go) | Several hours delay; tracks 2 days into next month |
| Forecast alert support | Via AWS Budgets based on predictions | Yes, toggle Type to Forecasted (0.01% to 1000%) | Yes, Forecasted spend threshold rules |
| Evaluation cadence | At least once every 24 hours | Evaluated every 24 hours | Pub/Sub multiple times daily; emails on threshold |
| UI and API pricing | UI free; API $0.01 per paginated request | Not specified in documentation | Not specified in documentation |
Catching runaway costs before the forecast updates
Native cloud forecasts are helpful for broad capacity planning, but they aren't built for fast incident response. If an automated script enters an infinite loop at 2 AM, waiting 24 hours for a provider's billing pipeline to update means you will read about the disaster in tomorrow's forecast after the money is already gone.
This is why we built Costbrake. Costbrake monitors what you spend across 23 cloud, AI, and SaaS providers, including AWS, Azure, Google Cloud, Cloudflare, OpenAI, Anthropic, and Vercel.
Instead of waiting a full day for an official billing roll-up, Costbrake checks your spend hourly on the Free plan, every 5 minutes on Pro and Team, and ramps up to as often as every minute, depending on the provider, when a spike is detected. A spike alert triggers if an hour costs more than 3x the usual baseline (calculated from the last 7 days) and adds at least $5 of unexpected spend.
Costbrake also runs its own forecast alert: it flags your account whenever your month-to-date spend plus the burn pace of the last 72 hours is on track to pass your budget before month-end. If an issue gets out of hand, Costbrake includes opt-in brakes for 18 providers on Pro and Team plans, letting you stop an EC2 instance, deallocate an Azure VM, or apply a spend cap with a click.
Pricing is straightforward: Free is $0 for 2 connections, Pro is $12 a month for 10 connections and 5-minute checks, and Team is $39 a month. You can review all the plan limits on our Costbrake pricing page. To get started without manually clicking through IAM consoles, tell your AI coding agent "Set up Costbrake for me so I get alerted when my cloud and AI bills spike. Follow the instructions at https://costbrake.com/agent" or read our agent setup guide.
Questions and answers
How does AWS forecast costs?
AWS Cost Explorer predicts future service usage by analyzing your past consumption patterns over time. It calculates an 80% prediction interval, displaying the projected spend range as bounding lines on line and bar charts.
How accurate are cloud cost forecasts?
Because provider forecasts are statistical predictions, they reflect historical averages rather than sudden architectural changes. If your historical spend is steady, the prediction band is tight, but unexpected traffic spikes or new resource deployments will diverge from the estimate until the billing system processes the new baseline.
Can I get an alert when my cloud forecast goes over budget?
Yes. AWS Budgets lets you trigger alarms based on predicted spend, Azure allows budget alerts configured with the Forecasted cost type, and Google Cloud Billing lets you set alert threshold rules on Forecasted spend for recurring calendar budgets.
Why doesn't my cloud forecast include today's usage?
Cloud billing systems process usage through batch pipelines that run hours behind real-time activity. AWS Cost Explorer data reflects usage only up to the previous day, Azure pay-as-you-go costs can lag by up to 72 hours, and Google Cloud accounts for ingestion delays by tracking monthly budget spend through the first two days of the following month.
Sources
- Forecasting with Cost Explorer - AWS Documentation
- Common cost analysis uses in Cost Management - Microsoft Cost Management - Microsoft Learn
- Analyzing your costs and usage with AWS Cost Explorer - AWS Documentation
- Exploring your data using Cost Explorer - AWS Documentation
- AWS Cost Explorer Pricing - Amazon Web Services
- Granular data - AWS Cost Management
- Create, edit, or delete budgets and budget alerts - Cloud Billing - Google Cloud
- Set up programmatic notifications - Cloud Billing - Google Cloud Documentation
Updated