How Azure Pricing Works
Understand the factors that affect Azure costs — resource type, tier, location, and consumption — and compare pay-as-you-go with reserved and spot pricing models.
How Azure Pricing Works is a free Cloud & IT Cert Prep lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cloud & IT Cert Prep learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Azure's Consumption-Based Pricing Model
Azure uses a pay-as-you-go (PAYG) pricing model: you pay only for the cloud resources you consume, with no upfront capital commitment and no minimum term. This is called OpEx (operational expenditure) as opposed to the traditional CapEx (capital expenditure) model of buying and owning servers. You are billed monthly based on your actual metered resource usage.
Key Factors That Affect Azure Cost
Azure resource costs are determined by several factors. Resource type and configuration — a 64-core VM costs far more than a 2-core VM. Region — prices vary by Azure region due to local energy, labour, and datacentre costs. Bandwidth — inbound data transfer to Azure is generally free; outbound transfer is charged per GB. Consumption level — some services like Azure Functions charge per execution; others like VMs charge per hour of uptime.
Pay-As-You-Go vs. Reserved Pricing
The default pay-as-you-go rate is the most flexible: you provision resources and pay hourly or per-second with no commitment. Reserved Instances commit to a one- or three-year term for a specific VM family or database tier, delivering discounts of up to 72% compared to PAYG. Reserved Instances are ideal for stable, predictable workloads where you can confidently plan one to three years ahead.
# Estimate reserved vs pay-as-you-go pricing via CLI
az vm list-vm-resize-options \
--resource-group myRG \
--name myVM \
--output table
# Or use the Azure Pricing Calculator at:
# https://azure.microsoft.com/en-us/pricing/calculator/Spot Pricing for Interruptible Workloads
Spot VMs (Azure Spot Virtual Machines) let you take advantage of unused Azure capacity at discounts of up to 90% off PAYG prices. The trade-off is that Azure can evict your Spot VM with only 30 seconds notice when it needs the capacity back. Spot VMs are ideal for stateless, fault-tolerant, and interruption-tolerant workloads: batch processing, rendering, large-scale simulations, and CI/CD build agents.
# Create a Spot VM
az vm create \
--resource-group myRG \
--name mySpotVM \
--image Ubuntu2204 \
--priority Spot \
--max-price -1 \
--eviction-policy DeallocateAzure Savings Plans
Azure Savings Plans for compute offer discounts of up to 65% on pay-as-you-go prices in exchange for a commitment to spend a specific dollar amount per hour for one or three years. Unlike Reserved Instances, Savings Plans are flexible — they apply across any VM series, size, region, or OS, automatically optimising savings as your workload composition changes. This makes them better suited to dynamic cloud environments.
Free Tier and Free Services
Azure offers both an Azure Free Account (12 months of select free services, 55+ always-free services, and a USD 200 credit for the first 30 days) and permanently always-free services within usage limits. Always-free examples include Azure Functions (1 million executions/month), Azure Blob Storage (5 GB/month), Azure DevOps (5 users with unlimited private repos), and many more. Free tier limits reset monthly.
CapEx vs. OpEx in Cloud
The shift from on-premises to cloud changes how IT spending appears on financial statements. CapEx is upfront investment in hardware that is depreciated over years — it ties up capital and requires forecasting years ahead. OpEx is operational spending billed as you consume services — it appears as a recurring expense and can be scaled up or down immediately. Cloud's OpEx model gives finance teams predictable monthly invoices and eliminates asset depreciation accounting.
Per-Second and Per-Execution Billing
Azure billing granularity varies by service. Virtual Machines are billed per-second from when they start to when they are stopped/deallocated (not just shut down — a stopped but allocated VM still accrues compute charges). Azure Functions on the Consumption Plan bill per execution and per GB-second of memory. Azure SQL Database bills per virtual core-hour. Understanding billing granularity prevents surprise charges.
# Deallocate a VM to stop compute charges (different from shutdown!)
az vm deallocate \
--resource-group myRG \
--name myVM
# Shutdown via OS still accrues charges:
# az vm stop = OS shutdown but allocated = still billed!
# az vm deallocate = fully released = no compute chargeData Transfer Costs
Network bandwidth costs are often overlooked in cloud cost estimates. Key rules for Azure: Inbound data transfer (into Azure) is free. Data transfer within the same Azure region is free. Outbound data transfer (from Azure to the internet) is charged per GB, with the first 100 GB/month free for most services. Cross-region data transfer within Azure is also charged per GB. These costs add up significantly for data-intensive applications.
Licensing and Azure Hybrid Benefit
Azure Hybrid Benefit is a licensing offer that lets you reuse on-premises Windows Server and SQL Server licences with Software Assurance on Azure VMs or Azure SQL Database/Managed Instance. By applying the benefit, you pay only the base compute cost rather than the bundled OS/database licence cost — savings of up to 40% on Windows VMs and up to 85% when combining Hybrid Benefit with Reserved Instances on SQL.
# Apply Azure Hybrid Benefit to a Windows VM
az vm update \
--resource-group myRG \
--name myWindowsVM \
--license-type Windows_ServerDev/Test Pricing
Azure offers Dev/Test pricing through Azure subscriptions linked to Visual Studio subscriptions. Dev/Test pricing removes the Windows Server and SQL Server OS licence charges on VMs used for development and testing environments, effectively making these resources significantly cheaper. Dev/Test subscriptions also provide access to specific dev/test images not available in production subscriptions. These resources must not be used to run production workloads.
Quick Check
Test your understanding of Microsoft Azure Fundamentals (AZ-900) concepts from this lesson.
Lesson Recap
In this lesson you learned: Azure uses a pay-as-you-go OpEx model where costs depend on resource type, region, and consumption, Reserved Instances and Savings Plans offer up to 72-65% discounts for predictable workloads, and Azure Hybrid Benefit reuses existing Windows Server and SQL Server licences to reduce Azure bills. Next up we explore the Azure Pricing Calculator and TCO Calculator tools.
Frequently asked questions
Is the “How Azure Pricing Works” lesson free?
Yes — the full text of “How Azure Pricing Works” is free to read here on the web, and the Cloud & IT Cert Prep course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cloud & IT Cert Prep course, upgrade to CoddyKit PRO.
What will I learn in “How Azure Pricing Works”?
Understand the factors that affect Azure costs — resource type, tier, location, and consumption — and compare pay-as-you-go with reserved and spot pricing models. You practise Cloud & IT Cert Prep with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Cloud & IT Cert Prep?
No prior experience is required. Cloud & IT Cert Prep on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “How Azure Pricing Works” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Cloud & IT Cert Prep lesson?
Yes. Every Cloud & IT Cert Prep lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.