Azure Functions Cost Calculator
Price the Functions consumption plan in GB-seconds and executions, including the monthly free grants.
Inputs
Billed duration is rounded up to the nearest 1 ms with a 100 ms minimum.
Rounded up to the nearest 128 MB when billed.
Monthly Cost
$10.40
Resource Consumption
1,000,000GB-s
Billable GB-seconds
600,000GB-s
Resource Charge
$9.60
Execution Charge
$0.80
Cost per Million Executions
$2.08
Step by step
Values used
Executions per month = 5 millions; Average execution time = 400 ms; Memory used per execution = 512 MB; Price per GB-second = 0.0000 USD; Price per million executions = 0.2000 USD; Free GB-seconds per month = 400,000 GB-s; Free executions per month = 1 millions
Azure Functions Cost
GB-seconds = executions × billed duration (min 100 ms) × memory rounded up to 128 MB blocks ÷ 1024; cost = (GB-s − 400,000 free) × GB-s price + (executions − 1 M free) ÷ 1 M × execution price.
Monthly Cost
= 10.40
Resource Consumption
= 1,000,000 GB-s
Billable GB-seconds
= 600,000 GB-s
Resource Charge
= 9.60
Execution Charge
= 0.80
Cost per Million Executions
= 2.08
How it works
The consumption plan charges two meters: resource consumption in GB-seconds, where memory is rounded up to 128 MB blocks and duration has a 100 ms floor, and a flat charge per million executions. Both meters have a monthly free grant, so small workloads genuinely cost nothing while long-running or memory-hungry functions are dominated by the GB-second line. The 100 ms floor and the 128 MB rounding mean thousands of trivial 5 ms functions cost the same as 100 ms ones, so batching work per invocation is usually cheaper than fanning out — check the current GB-second and execution prices in the Azure pricing calculator, and note that Premium and Flex Consumption plans bill differently.
Formula
Azure Functions Cost
GB-seconds = executions × billed duration (min 100 ms) × memory rounded up to 128 MB blocks ÷ 1024; cost = (GB-s − 400,000 free) × GB-s price + (executions − 1 M free) ÷ 1 M × execution price.
- GB-second
- One gigabyte of memory held for one second
- free grant
- Monthly allowance of 400,000 GB-seconds and 1 million executions
- billed duration
- Execution time with a 100 ms floor applied
Frequently Asked Questions
How is Azure Functions Cost calculated?
GB-seconds = executions × billed duration (min 100 ms) × memory rounded up to 128 MB blocks ÷ 1024; cost = (GB-s − 400,000 free) × GB-s price + (executions − 1 M free) ÷ 1 M × execution price. The consumption plan charges two meters: resource consumption in GB-seconds, where memory is rounded up to 128 MB blocks and duration has a 100 ms floor, and a flat charge per million executions. Both meters have a monthly free grant, so small workloads genuinely cost nothing while long-running or memory-hungry functions are dominated by the GB-second line.
Why does Azure Functions Cost matter?
The 100 ms floor and the 128 MB rounding mean thousands of trivial 5 ms functions cost the same as 100 ms ones, so batching work per invocation is usually cheaper than fanning out — check the current GB-second and execution prices in the Azure pricing calculator, and note that Premium and Flex Consumption plans bill differently.
What values do I need to enter?
This calculator takes 7 inputs: Executions per month, Average execution time, Memory used per execution, Price per GB-second, Price per million executions, Free GB-seconds per month, Free executions per month. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.
You might also need
- Azure Cosmos DB RU CalculatorCommonly used together
- Azure Monitor Cost CalculatorCommonly used together
- Azure App Service Cost CalculatorCommonly used together
- Azure Blob Storage CalculatorAlso in Microsoft Azure
- Azure Advisor Savings CalculatorAlso in Microsoft Azure
- Azure VM Cost CalculatorAlso in Microsoft Azure