Cost Calculator for Defender for Cloud

Did you know Microsoft Defender for Cloud has a built-in cost calculator to easily calculate the costs of protected resources in your cloud environment? No? Well, I didn’t either until I stumbled upon the button in the MDC portal myself. Apparently, Microsoft announced the preview for the MDC cost calculator last month, on February 19, 2025.

With this post, I’m sharing my experience with this new cost calculator for Microsoft Defender for Cloud, providing guidance and comparing available options to calculate the costs.

Today’s post will cover the following sections:

Please remember that this post was written during the public preview experience; some things might have changed slightly.

The Cost Calculator for Defender for Cloud

To find the Microsoft Defender for Cloud cost calculator, navigate to the Microsoft Defender for Cloud portal in Microsoft Azure. Then, you can find the cost calculator button in the environment settings.

Next, we can choose between three available options to start calculating costs.

  1. Add assets with a script: to accurately calculate costs for your existing azure (and AWS or GCP) environment.
  2. Use existing environments: to calculate costs for your existing (already onboarded) azure environment.
  3. Add custom environment: to quickly calculate costs for any hypothetical azure environment.

In the next chapters, we’ll try out all the available options and see how they work in practice.

Option 1: Add assets with script

With this option, we’ll run a script to collect the required resource information from our Azure subscription. The advantage of this option is that we’ll be able to collect dynamic assets that can change a lot during the month. It will check the last 30 days to evaluate the costs as accurately as possible.

Before we start, there are some prerequisites for this option.

  • Click here to download and install PowerShell 7.
  • Click here to install the Azure PowerShell module.
  • Ensure you have the required permissions to run the script in your cloud environment.
  1. To start, click the download script button to download the script for Azure (or select AWS or GCP first).
  1. Next, open the PowerShell 7 application as Administrator.
  2. Then, run the script and sign in to your administrator account. If you can’t run the script from your device, try the “Set-Executionpolicy -ExecutionPolicy Unrestricted” cmdlet before running the script.
  1. Then, upload the exported CSV in step two of the wizard.
  1. After uploading the script, you can select resources and click on the Calculate button.
  1. Lastly, you can view your cost estimate based on environments or Defender plans.

That didn’t take much time, and it is the preferred option if you want the most accurate cost estimate for protecting your Azure resources.

Option 2: Use existing environments

With this option, we can get a cost estimate for our existing Azure environment, but the environment itself must already be onboarded in Microsoft Defender for Cloud. Be aware that the results might be less accurate than using option one because it doesn’t take dynamic assets such as Defender for APIs, CosmosDB, and Malware scanning into account. Don’t choose this option if you are not using Microsoft Defender for Cloud yet.

After selecting option two at the beginning of the calculator wizard, we can immediately choose resources and click the Calculate button. Please note that you will not see any resources here that have not yet been onboarded in Defender for Cloud.

Since all my Azure resources are protected by Defender for Cloud, I received the same cost estimate as I did during option one. While this option may be the quickest, I don’t think I’ll use it very often since I would mainly use the calculator in situations where I am not yet using Defender for Cloud.

Option 3: Add custom environment

The last option is really useful whenever you are planning out a new azure subscription, cloud environment or simply making a cost estimate for a new potential customer or project. We can freely add any assets to the list and get results quickly.

After selecting option three at the beginning of the calculator wizard, we should give our environment a new name and then we can add any amount of resources, units, and subplans. If you think you’re done you can click the Add button to start the calculation.

Next, we can see the monthly estimated costs for our hypothetical new Azure subscription and get a nice view based on environments or Defender plans.

Wrap up

Even though the Defender for Cloud cost calculator feature is in preview at the time of writing this blog post, I must say I really like it. It’s quick, easy, and accurate. I can pull it up on the screen anytime during a customer meeting and give them a rough cost estimate quickly or an accurate one for an existing environment by using the script.

I would love to know what you folks think about this new feature. Have a great day, and feel free to leave a comment below.

Cost Calculator for Defender for Cloud

About the author

Myron Helgering:

0 Comments

Would you like to share your thoughts?

Your email address will not be published. Required fields are marked *

Leave a Reply