Chapter 16 — Azure Cost Management

Understanding Azure Costs

One of the biggest advantages of cloud computing is pay-as-you-go pricing — but without proper management, cloud costs can grow unexpectedly. Azure provides tools to estimate, monitor, and optimize your spending.


Factors That Affect Azure Costs

Before using cost tools, understand what drives costs:

Factor

How It Affects Cost

Resource type

VMs cost more than storage; GPU VMs cost more than general VMs

Region

The same VM in East US vs. West Europe may have different pricing

Bandwidth

Inbound data to Azure is mostly free; outbound data is charged

Usage time

A VM running 24/7 costs more than one running 8 hours/day

Tier / SKU

Premium SSD is more expensive than Standard HDD

Reserved vs. pay-as-you-go

Reservations offer up to 72% savings for committed usage

Support plan

Developer, Standard, Professional Direct, Premier

Licensing

Windows VMs cost more than Linux due to license fees


1. Azure Pricing Calculator

What Is It?

The Azure Pricing Calculator is a free online tool that lets you estimate the cost of Azure services before you deploy anything.

You configure services with your expected settings (region, tier, hours of use) and get a cost estimate.

Access it at: azure.microsoft.com/en-us/pricing/calculator/

How to Use It

  1. Go to the Pricing Calculator

  2. Search for a service (e.g., "Virtual Machine")

  3. Select your configuration:

    • Region (East US, West Europe, etc.)

    • Operating System (Windows/Linux)

    • Instance type (D2s v5, B2ms, etc.)

    • Hours per month (e.g., 730 = full month 24/7)

  4. Add more services (storage, database, bandwidth)

  5. See the total estimated monthly cost

  6. Export the estimate as Excel or share via URL

Example Estimate

Configuration:
  VM:  Standard D2s v3 (2 vCPU, 8 GB RAM)
  OS:  Linux
  Region: East US
  Hours: 730/month

Estimated cost: ~$70/month

Add SQL Database (General Purpose, 2 vCores):
Additional: ~$183/month

Total estimate: ~$253/month

2. Total Cost of Ownership (TCO) Calculator

What Is It?

The TCO Calculator helps you estimate the savings from migrating your on-premises infrastructure to Azure by comparing the total cost of running workloads on-premises vs. in Azure.

Access it at: azure.microsoft.com/en-us/pricing/tco/calculator/

How TCO Calculator Works

Step 1 — Define Workloads: Enter your current on-premises setup:

  • Number of servers (Windows/Linux)

  • Databases (SQL Server, MySQL, etc.)

  • Storage amounts

  • Networking bandwidth

Step 2 — Adjust Assumptions: Review and adjust assumed costs:

  • Electricity cost per kWh

  • IT labor cost

  • Hardware refresh cycle

  • Data center overhead

Step 3 — View the Report: The calculator generates a detailed 5-year cost comparison:

On-Premises (5 years):  $2,850,000
Azure (5 years):        $1,100,000
─────────────────────────────────
Estimated savings:      $1,750,000 (61%)

Who Uses TCO Calculator?

  • IT managers building business cases for cloud migration

  • Finance teams evaluating cloud ROI

  • Executives comparing CapEx vs. OpEx models


3. Azure Cost Management + Billing

What Is It?

Azure Cost Management + Billing (also called Microsoft Cost Management) is the built-in Azure tool for monitoring, allocating, and optimizing your actual Azure spending after resources are deployed.

It's available directly in the Azure portal under Cost Management + Billing.

Key Features

Feature

Description

Cost analysis

Visualize spending by service, resource group, tag, subscription

Budgets

Set monthly spending limits with alerts

Recommendations

Advisor-powered cost-saving suggestions

Exports

Automated cost data exports to storage account

Cost allocation

Tag-based cost distribution across departments

Invoice and billing

Download invoices, view payment history

Cost Analysis Views

View spending by:
  ├── Service (VM: 45%, Storage: 20%, SQL: 30%, Other: 5%)
  ├── Resource Group (ProjectA: $450, ProjectB: $800)
  ├── Tag (Department: Engineering $600, Marketing $200)
  ├── Subscription
  └── Time range (daily, weekly, monthly)

Budgets and Alerts

You can create budgets to prevent surprise bills:

Budget: "Monthly Azure spend ≤ $1,000"
  Alert at 80% ($800): Email finance team
  Alert at 100% ($1,000): Email all stakeholders
  Alert at 110% ($1,100): Email CTO

Budgets do NOT stop resources from running — they send alerts only.


4. Ways to Reduce Azure Costs

Reserved Instances (Reservations)

Commit to using a specific VM type in a specific region for 1 or 3 years in exchange for a significant discount vs. pay-as-you-go:

Reservation

Discount vs. Pay-as-you-go

1-year

Up to 40%

3-year

Up to 72%

Best for: VMs that run 24/7 for production workloads where you know the size needed.

Azure Spot VMs

Spot VMs use Azure's unused compute capacity at up to 90% discount — but Azure can evict them with 30 seconds notice when capacity is needed.

Best for: Batch jobs, rendering, testing, stateless workloads that can be interrupted.

Azure Hybrid Benefit

If you already own Windows Server or SQL Server licenses with Software Assurance (on-premises), you can reuse those licenses on Azure VMs — saving up to 40% on compute costs.

Right-Sizing

Use Azure Advisor cost recommendations to find and resize over-provisioned resources:

VM: Standard D8s_v3 (8 vCPU) — avg CPU usage: 2%
Recommendation: Resize to Standard B2ms (2 vCPU) → Save $180/month

Auto-Shutdown

For dev/test VMs that don't need to run nights or weekends:

Auto-Shutdown: 7 PM weekdays + all day weekends
→ VM runs 45 hrs/week instead of 168 hrs/week
→ Save ~73% on VM compute costs

Delete Unused Resources

  • Unused VMs and disks still incur charges

  • Unused public IP addresses have a small monthly cost

  • Old snapshots accumulate costs

  • Orphaned load balancers charge even with no traffic

Use Azure Advisor to identify idle resources.


Cost Optimization Summary

Strategy

Savings Potential

Reserved Instances

Up to 72% on compute

Spot VMs

Up to 90% (for interruptible workloads)

Azure Hybrid Benefit

Up to 40% on Windows/SQL licensing

Right-sizing

Eliminate waste from over-provisioning

Auto-shutdown

50–80% on dev/test VMs

Delete unused resources

Eliminate 100% of orphaned costs

Access tiers (Blob)

Move cold data to Archive tier


Quick Recap

Pricing Calculator → Estimate costs BEFORE deploying
TCO Calculator     → Compare on-premises vs. Azure cost over 5 years
Cost Management    → Monitor and analyze ACTUAL spending
Budgets            → Set alerts before you overspend

Top savings: Reservations, Spot VMs, Hybrid Benefit, right-sizing

Official References


Next Chapter → Chapter 17: Azure Governance Tools