Halfway through the month, someone asks: "Where will we land?" The invoice will not tell you for weeks, and Cost Management's built-in forecast is a line on a chart that is hard to explain to a team. Here is a month-end estimate you can do by hand in a spreadsheet, explain in one sentence, and check against your budget. Then how we automated it.
1. Get the recorded daily cost
In the Azure portal, open Cost Management > Cost analysis for the subscription, choose the Daily costs view for the current month, and download it as CSV. You now have one row per day with its cost.
Two things to know before you use it:
- Cost arrives a day or two late. The last day or two in the file are usually incomplete. Find the latest day you trust; call it the latest recorded day. Everything after it is "remaining".
- Keep one currency. If your scope is billed in more than one currency, do the estimate per currency. Adding USD and EUR without a rate gives a number that means nothing.
2. Average the latest seven days
Take the latest seven days with recorded cost and average them. Seven days covers a full week, so weekend dips and weekday peaks cancel out. If the month has fewer than seven recorded days, average what you have.
Example: the latest seven days cost 120, 118, 131, 125, 90, 88, 128. The average is 114.29 a day.
3. Add a trend once you have two weeks
With 14 or more recorded days, compare the average of the latest seven days with the average of the seven before them. If the earlier week averaged 107.14, the daily cost rose by about 7.14 a week, or about 1.02 a day. Add that daily step to each day ahead: day one is 115.31, day two 116.33, and so on. Never let a day go below zero.
Without a trend, a cost that is climbing steadily is underestimated every time.
4. Add up the month
- Recorded so far: the sum of the recorded days this month.
- Forecast for the remaining days: the sum of your forecast days, from the day after the latest recorded day to the last day of the month.
- Forecast to month end: the two added together.
Then put two numbers next to it:
- Your monthly budget, in the same currency: the forecast as a share of it, and how much over or under.
- Last month's recorded cost for the same subscriptions: the change as an amount and a percentage.
5. Put a band around it, and say what it is
Add 10% either side of each forecast day and sum again, with the recorded cost in front. That gives a low and a high month-end figure. Be clear with your team about what this is: not a probability, and not a confidence interval. It shows how far a 10% miss on every remaining day would move the month. Early in the month the band is wide, because most of the month is still forecast; near the end it is narrow.
The automated way
(I build CostGuard, an Azure cost tool sold on Azure Marketplace.) Its Forecast overview page automates this on the Pro plan: the cost recorded so far plus a Baseline forecast for the remaining days, made from the latest seven days with a daily trend once fourteen days are recorded, refreshed about once an hour, held against the budget of the scope and against last month.
It also says which subscriptions the forecast covers and which it leaves out, and why, so "Covers 2 of 4 subscriptions in scope" is never hidden inside a total. The day-by-day table shows the recorded days first, then a forecast amount for each remaining day.
Honest limits
- It is an estimate from recorded cost, not a bill. The invoice can differ.
- A seven-day average does not know about the batch job you plan for the 28th. A one-off spike in the last seven days also inflates it.
- The band is fixed at 10% by the method; it does not measure how likely the forecast is.
- Amounts in different currencies are never added or compared, and no exchange rate is applied.
- In CostGuard, forecasting is a Pro feature; each subscription needs an active Baseline forecast scenario before it is covered. CostGuard only reads your Azure cost; nothing in Azure is changed.
The full walkthrough of the page, figure by figure:
https://hoshebartar.com/en/help/forecast-overview?utm_source=devto&utm_medium=article&utm_campaign=kb-forecast-overview
How do you answer "where will we land this month": the portal forecast, a spreadsheet, or a gut feeling?


Top comments (0)