A Microsoft offering that enables tracking of cloud usage and expenditures for Azure and other cloud providers.
Welcome to Microsoft Q&AHello @Piyush Solanki I hope you are doing well.
The savings cannot be calculated directly from the retention setting alone because Microsoft charges for retained data based on the average volume of data retained beyond the included retention period, not simply by multiplying the current storage by the number of days.
To estimate your potential savings, you should first determine how much data is being retained beyond the included retention period.
1. Check your current retention settings
In your Log Analytics workspace:
Log Analytics Workspace > Usage and estimated costs
Log Analytics Workspace > Properties
These pages show your current retention period and daily ingestion volume.
2. Estimate the retained data
If your workspace ingests approximately X GB/day, then the billable retained data is roughly:
Billable retention (GB) =
Daily ingestion (GB/day) × (Configured retention - Included retention)
For example:
Daily ingestion: 10 GB/day
Retention: 365 days
Included retention: 90 days
Then:
10 × (365 - 90) = 2,750 GB
This is the approximate volume subject to long-term retention charges.
3. Calculate the savings
If you reduce retention from 365 days to 90 days, the retained data beyond the included period becomes 0 GB, so your monthly savings would be approximately:
Billable retained GB × Azure retention price per GB-month
The exact amount depends on your region and pricing tier. You can obtain the current rate using the Azure Pricing Calculator.
- View how much data is stored
To understand your ingestion patterns, you can run the following KQL query:
Usage
| summarize TotalGB = sum(Quantity) by bin(TimeGenerated, 1d)
| order by TimeGenerated desc
- Or review Usage and estimated costs, which provides daily ingestion trends directly in the Azure portal.
Note: Log Analytics does not expose a single metric showing the exact number of GB currently retained for billing purposes. Retention charges are calculated by Azure based on retained data over time, so the closest estimate is derived from your daily ingestion rate and configured retention period.
References:
Azure Monitor Logs pricing:
https://learn.microsoft.com/azure/azure-monitor/logs/cost-logs
Manage Log Analytics workspace retention:
https://learn.microsoft.com/azure/azure-monitor/logs/data-retention-configure
Azure Pricing Calculator:
https://azure.microsoft.com/pricing/calculator/
If my answer helped you, please consider marking it as accepted. This helps others in the community find similar solutions.