Skip to content
Azure Cost Management: Reduce Your Azure Bill

Azure Cost Management: Reduce Your Azure Bill

DodaTech Updated Jun 20, 2026 7 min read

Azure Cost Management is the practice of reducing your Azure bill by right-sizing VMs, leveraging reserved capacity, applying Azure Hybrid Benefit, using dev/test pricing, and setting budgets — without compromising performance.

What You’ll Learn

  • Navigating Azure Cost Management + Billing
  • Azure Advisor cost optimization recommendations
  • Reserved Instances vs Azure Savings Plans
  • Azure Hybrid Benefit for Windows Server/SQL Server
  • Right-sizing VMs and autoscaling
  • Storage tiering and lifecycle management
  • Dev/test pricing and Azure Spot VMs
  • Budgets, alerts, and cost anomaly detection

Why It Matters

Azure spend grows silently — auto-scaling groups, unmanaged disks, orphaned public IPs, and over-provisioned VMs compound costs. Most Azure accounts waste 30-35% of spend. DodaTech reduced infrastructure costs for DodaZIP’s build pipeline by 50% using Spot VMs and Azure Hybrid Benefit.

    flowchart LR
    A[Cost Management] --> B[Advisor Recommendations]
    B --> C[Reserved Instances]
    B --> D[Right-Sizing]
    B --> E[Hybrid Benefit]
    A --> F[Spot VMs]
    A --> G[Storage Tiering]
    C --> H[40-60% Savings]
    style H fill:#0078d4,color:#fff
  

1. Azure Cost Management + Billing

The Azure portal’s Cost Management + Billing blade is your central hub. Use it to analyze spend by subscription, resource group, service, or tag.

# Query cost via Azure CLI
az consumption usage list \
  --billing-period-name 202606 \
  --query "[].{Service:consumedService, Cost:pretaxCost}" \
  --output table

Expected output:

Service                    Cost
-------------------------  --------
Virtual Machines           $12,430
Storage                    $3,210
SQL Database               $2,890
Bandwidth                  $1,560
Azure Functions            $720

Set up Cost Views grouped by service, location, or tag to identify the biggest cost drivers.

2. Azure Advisor Cost Recommendations

Azure Advisor analyzes your resource usage and provides personalized recommendations to optimize costs, performance, reliability, and security.

# List Advisor cost recommendations
az advisor recommendation list \
  --category Cost \
  --query "[].{Name:shortDescription, Impact:impact, Resource:resourceName}" \
  --output table

Typical recommendations:

  • Right-size or shut down underutilized VMs
  • Purchase Reserved Instances for VMs with steady usage
  • Delete unmanaged disks unattached to any VM
  • Configure autoscaling for VMSS
  • Use Azure Hybrid Benefit for Windows workloads

3. Reserved Instances and Azure Savings Plans

ModelDiscountFlexibilityCommitment
Reserved VM Instance (1yr)30-40%Specific size/region1 year
Reserved VM Instance (3yr)50-60%Specific size/region3 years
Azure Savings Plan (1yr)30-45%Any service, any region1 year
Azure Savings Plan (3yr)45-65%Any service, any region3 years
# Purchase a Reserved VM Instance
az reservation purchase \
  --reservation-order-id "order-123" \
  --applied-scope-type Single \
  --sku Standard_D2s_v3 \
  --location eastus \
  --quantity 3 \
  --term P1Y \
  --billing-plan Monthly

# Check savings from existing reservations
az reservation list \
  --query "[].{Name:name, State:properties.state, Savings:properties.savings}" \
  --output table

4. Azure Hybrid Benefit

If you already have Windows Server or SQL Server licenses with Software Assurance, Azure Hybrid Benefit lets you use those licenses in Azure at no additional cost — saving up to 40% on Windows VMs and up to 55% on SQL Server.

# Enable Hybrid Benefit on an existing VM
az vm update \
  --resource-group prod-rg \
  --name sql-vm-01 \
  --set "storageProfile.osDisk.osType=Windows" \
  --license-type Windows_Server

# For SQL Server VMs
az sql vm update \
  --resource-group prod-rg \
  --name sql-vm-01 \
  --sql-license-type PAYG

5. Right-Sizing VMs

Azure Monitor provides VM insights with CPU, memory, disk, and network metrics. Rightsize when utilization is low for 14+ days.

# Analyze VM CPU utilization
az monitor metrics list \
  --resource /subscriptions/sub-123/resourceGroups/prod/providers/Microsoft.Compute/virtualMachines/web-01 \
  --metric "Percentage CPU" \
  --interval PT1H \
  --start-time 2026-05-01T00:00:00Z \
  --end-time 2026-06-01T00:00:00Z \
  --aggregation average

# Resize a VM
az vm resize \
  --resource-group prod-rg \
  --name web-01 \
  --size Standard_D2s_v3

Autoscaling with VMSS ensures you only pay for what you need:

# Create autoscale settings
az monitor autoscale create \
  --resource-group prod-rg \
  --name web-autoscale \
  --resource web-vmss \
  --resource-type Microsoft.Compute/virtualMachineScaleSets \
  --min-count 2 \
  --max-count 10 \
  --count 3

az monitor autoscale rule create \
  --resource-group prod-rg \
  --autoscale-name web-autoscale \
  --condition "Percentage CPU > 75 avg 5m" \
  --scale out 2

6. Storage Tiering

Azure Blob Storage offers hot, cool, cold, and archive tiers with lifecycle management.

# Set lifecycle management policy
az storage account management-policy create \
  --account-name dodatechstorage \
  --policy '{
    "rules": [{
      "name": "tier-data",
      "enabled": true,
      "type": "Lifecycle",
      "definition": {
        "filters": {"blobTypes": ["blockBlob"]},
        "actions": {
          "baseBlob": {
            "tierToCool": {"daysAfterModificationGreaterThan": 30},
            "tierToArchive": {"daysAfterModificationGreaterThan": 180},
            "delete": {"daysAfterModificationGreaterThan": 365}
          }
        }
      }
    }]
  }'

Tier pricing: Hot $0.018/GB → Cool $0.01/GB → Cold $0.004/GB → Archive $0.00099/GB.

7. Dev/Test Pricing

Azure Dev/Test pricing offers significantly reduced rates for workloads running in dev/test subscriptions. Windows VMs cost the Linux rate, and you pay no license costs for SQL Server, Visual Studio, and other Microsoft software.

# Use dev/test subscription with Enterprise Dev/Test offer
az vm create \
  --resource-group dev-rg \
  --name dev-vm-01 \
  --image Win2019Datacenter \
  --size Standard_D2s_v3 \
  --license-type Windows_Server  # No additional Windows license cost

8. Azure Spot VMs

Spot VMs offer up to 90% discount but can be evicted when Azure needs capacity back. Perfect for batch processing, CI/CD, dev/test, and stateless workloads.

# Create a Spot VM
az vm create \
  --resource-group batch-rg \
  --name batch-vm-01 \
  --image UbuntuLTS \
  --size Standard_D4s_v3 \
  --priority Spot \
  --eviction-policy Deallocate \
  --max-price 0.05

Common Mistakes

  1. Not using Azure Hybrid Benefit: If you have Software Assurance, not enabling Hybrid Benefit is literally leaving 40% on the table for every Windows or SQL VM.

  2. Paying for managed disks you don’t use: Orphaned disks persist after VM deletion. az disk list --query "[?managedBy=='null']" finds them.

  3. No autoscaling for VMSS: Fixed-count VMSS waste money during low-traffic periods. Always set min/max rules.

  4. Skipping Reserved Instances for steady-state VMs: Production databases and domain controllers run 24/7 — they’re ideal for 1-year or 3-year reservations.

  5. Forgetting dev/test pricing: Dev/test subscriptions reduce Windows license costs to zero. Always use dev/test offers for non-production workloads.

Practice Questions

  1. How does Azure Hybrid Benefit save money? Answer: It lets you use existing Windows Server and SQL Server licenses (with Software Assurance) in Azure without extra license fees, saving 40-55%.

  2. What is the difference between Reserved Instances and Azure Savings Plans? Answer: RIs apply to a specific VM size in a region; Savings Plans apply to any compute service (VM, Containers, Azure Functions) across any region.

  3. How do you detect underutilized VMs in Azure? Answer: Use Azure Advisor cost recommendations or check Percentage CPU < 15% and Available Memory > 70% over 14 days via Azure Monitor.

  4. When should you use Spot VMs? Answer: For fault-tolerant, stateless, interruptible workloads: batch jobs, CI/CD, testing, non-critical dev environments.

Challenge

Optimize a $60k/month Azure subscription: analyze Cost Management exports for the last 90 days, apply Advisor cost recommendations, purchase Savings Plans for 70% of baseline compute, enable Hybrid Benefit on all eligible Windows and SQL VMs, rightsize underutilized VMs, create storage lifecycle policies for all blob storage accounts, and set up budget alerts at 50/80/90/100%.

FAQ

Can I use Azure Hybrid Benefit with Reserved Instances?
: Yes, they stack. You get the RI discount on the compute rate and Hybrid Benefit eliminates the license cost. Combined savings can reach 65-80%.
How do I set up budget alerts in Azure?
: Go to Cost Management + Billing → Budgets → Create. Set the amount, scope (subscription/resource group), and notification thresholds.
What is the easiest cost optimization in Azure?
: Enable Azure Advisor and implement its top 5 cost recommendations. This typically takes one sprint and saves 10-20%.
Are Spot VMs reliable for production?
: No — Spot VMs can be evicted with 30 seconds notice. Use them for stateless, fault-tolerant workloads only.
How often should I review Azure costs?
: Weekly for anomalies, monthly for rightsizing, quarterly for reservation purchases.

What’s Next

TopicDescription
Reserved Instances & Savings Plans
Deep dive into commitment-based discounts
Spot & Preemptible Instances
80-90% discount on compute

Related topics: Cloud Cost Optimization, Multi-Cloud, AWS

Built by the developers of Doda Browser, DodaZIP, and Durga Antivirus Pro.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro