Regarding usage price calculation - Azure Blob Storage

Test Admin 131 Reputation points

We are using Azure Blob Storage with Standard Tier.

We have a query regarding usage price calculation.

If we create multiple containers in the Azure blob storage, is it possible to calculate the usage price for each individual container in the blob storage?

e.g. If we create "Container-A" and "Container-B" in the Azure blob storage, is it possible to calculate monthly usage price for "Container-A" and "Container-B" individually?

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,415 questions
0 comments No comments
{count} votes

Accepted answer
  1. Anand Prakash Yadav 5,525 Reputation points Microsoft Vendor

    Hello Test Admin,

    Thank you for posting your query here!

    You can consider leveraging Blob Inventory. Blob inventory will periodically scan your Storage (can be scoped to container or even folder) and calculate total object size and number of objects, amongst other things. The result of this is delivered to another container in the form of CSV or Parquet file.

    You can also use this PowerShell script that traverses all the blobs in each container and calculates the sizes: Azure PowerShell script sample - Calculate the total billing size of a blob container | Microsoft Learn

    The best option would be analyzing how much data is stored per container (Azure Storage explorer is one option) and use it as alternative to understand usage per container.

    Inventory job fails to complete for hierarchical namespace enabled accounts.
    The inventory job might not complete within 2 days for an account with hundreds of millions of blobs and hierarchical namespace enabled. If this happens, no inventory file is created. If a job does not complete successfully, check subsequent jobs to see if they complete before contacting support. The performance of a job can vary, so if a job doesn't complete, it's possible that subsequent jobs will.

    To count the bytes in a storage account you need to iterate over each object in the storage account. Blob inventory does this for you using some tricks on the backend, but you can also call the list blob api to get your own list (i.e. writing code). Both suffer the same problem on larger accounts it is hard to list all the objects in the account. If you write your own code you can use your knowledge of the account to scale out the listing operation and build robust retry logic because listing a large account will be a significant number of calls to the api.

    Azure Blob Storage pricing:

    Understand the full billing model for Azure Blob Storage

    Public preview: Multitasking in the cost analysis preview

    If the issue is still not rectified, for more specialized assistance on this kindly contact Azure Billing support, it's free, and it's the best choice for you:

    I hope this helps! Please let me know if you have any other questions or need further clarification.

    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members. 

1 additional answer

Sort by: Most helpful
  1. Amrinder Singh 1,740 Reputation points Microsoft Employee

    Hi @Test Admin - Thanks for reaching out.

    In the billing report which is generated, the calculation is based on the total capacity of account and not just different containers.

    As a workaround, you can attempt to calculate the size of container and then check based on pricing along with pricing calculator, which might help you with some estimates. Below are some of the links that talks about calculating container level capacity and then make use of pricing page to get some estimates further.

    Please let me know for any further queries and will be glad to assist.

    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.