1

I am trying to calculate the cost incurred on my Azure Pay-As-You-Go subscription using the usage and rate-card API's. For this I came across this parameter includedQuantity in the rate-card API's which, according to the documentation, refers to "The resource quantity that is included in the offer at no cost. Consumption beyond this quantity will be charged."

Consider an example, where the usageQuantity is 700 and the rate-card is as follows:

0 : 20
101 : 15
501 : 10

and the includedQuantity is 200.

My assumption was, the calculation would be as one of the following:

  1. Quantity = (700 - 200) = 500 Hence, cost = 100 * 20 + 400 * 15 = 8000

  2. New rate card:

0 : 0 101 : 0 201 : 15 501 : 10

So, cost = 300 * 15 + 200 * 10 = 6500

I have seen this question, but it does not clarify the includedQuantity properly.

Community
  • 1
  • 1
jobin
  • 2,600
  • 7
  • 32
  • 59

1 Answers1

-1

Great question! So I checked with Azure Billing team on this and what they told me is that they will first take off the included units (200 in your example) and then apply graduated pricing on the remaining units.

Based on this, your cost would be 4500:

Total units consumed: 700 Included units: 200 Tiered pricing: {0-100 = 0; 101-200 = 0; 201-500=15; 501-No Upper Limit=10}

4500 = 0 x 100 + 0 x 100 + 15 x 300

Gaurav Mantri
  • 128,066
  • 12
  • 206
  • 241
  • Shouldn't it be `6500 = 0 x 100 + 0 x 100 + 15 x 300 + 10 x 200` Your math only pays for 300 consumed quantity and not 500. –  Mar 05 '17 at 12:11
  • @JohnSmith Above calculation is based on the assumption that pricing calculation will be based on 500 units (700 units consumed - 200 included units) (100 + 100 + 300). With your calculation, you are calculating on all 700 units (100 + 100 + 300 + 200). – Gaurav Mantri Mar 05 '17 at 13:34
  • why are the 100 + 100 free then? according to the meter rates they should cost 20 and 15. In the calculation you substract the included quantity and then ALSO pay 0 for the first 200 quantity. I don't think that can be right. This would mean for each includedQuanitty you basically get double that for free. –  Mar 05 '17 at 17:41
  • That was my question to Billing team as well :). – Gaurav Mantri Mar 05 '17 at 17:47
  • I see... Is there any chance of some official documentation being made for this? Because as it stands it's almost impossible to calculate your cost accuratly –  Mar 05 '17 at 17:52