- GB-s = Executions × (Memory_MB ÷ 1024) × (Duration_ms ÷ 1000).
- Consumption cost = max(0, Exec − FreeExec)/1,000,000 × PricePerMillion + max(0, GBs − FreeGBs) × PricePerGBs.
- Flex cost = On-demand (same structure) + Always-ready baseline (Instances × MemGB × IdleSeconds) × BaselineRate + Always-ready execution charges.
- Premium cost = (vCPU-s × Rate_vCPU_s) + (GB-s × Rate_GB_s) for allocated instances.
- Dedicated cost = InstanceHours × RatePerInstanceHour.
- Discount reduces all unit-priced line items by the same percent.
- Total = (Plan + Add-ons) + Overhead + Tax.
- Pick a plan that matches your hosting choice.
- Enter one or more workload profiles from monitoring data.
- Set your regional unit rates, free grants, and discounts.
- Add storage, monitoring, and egress if you use them.
- Press Calculate to view totals above the form.
- Download CSV or PDF to share with stakeholders.
| Scenario | Plan | Executions | Duration | Memory | GB-s | Estimated cost |
|---|---|---|---|---|---|---|
| API bursty | Consumption | 3,000,000 | 1000 ms | 512 MB | 1,500,000 | $18.00 |
| Small scheduler | Consumption | 900,000 | 250 ms | 256 MB | 56,250 | $0.00 |
| Always-ready HTTP | Flex | 5,000,000 | 200 ms | 2048 MB | 2,000,000 | Varies by baseline inputs |
1) What counts as an execution?
An execution is counted each time a function runs in response to a trigger event, such as an HTTP call, queue message, or timer. Retries and replays can increase counts, so include realistic retry behavior in your estimates.
2) How is execution time cost measured?
Consumption-style plans charge for observed resource consumption in GB-seconds. You multiply memory (in GB) by execution time (in seconds) and by total executions, then apply free grants and rates.
3) Why does the calculator include “free grants”?
Consumption models often include monthly free quantities for executions and GB-seconds. If your workload stays under those thresholds, the compute portion can be zero. Free grants usually apply per subscription, not per function app.
4) Why might my invoice differ from this estimate?
Differences can come from rounding rules, higher peak memory, retries, additional bindings, outbound bandwidth, storage, and monitoring ingestion. Premium and always-ready options can also charge for idle capacity you keep allocated.
5) How do I estimate multiple functions with different profiles?
Use multiple workload rows. Put each function group’s executions, duration, and memory into its own row. The calculator sums executions and GB-seconds across rows before applying plan rules and free grants.
6) When is Premium cheaper than Consumption?
Premium can be cost-effective when you need always-on readiness, VNET access, predictable latency, or sustained load that would exceed consumption grants and rates. Because you pay for allocated instances, low-utilization apps may cost more on Premium.
7) Does idle time cost money?
On legacy Consumption and on-demand Flex, idle time can scale to zero. In Premium, Dedicated, and Flex always-ready, you typically pay for allocated capacity even when requests are low, because instances remain available.
8) Which inputs change cost the most?
Executions, duration, and memory drive GB-seconds. Small increases in memory or latency can multiply cost at scale. Start by improving average duration and memory use, then refine with monitoring and real traffic patterns.