Cloudability logo
Registration is Now Open for CloudyCon 2019
Spend Visibility

Vlog: How to calculate AWS blended and unblended rates

By Mike McCullough on July 24, 2015
Whiteboard friday

AWS provides an immense amount of granularity into your cost and usage via your Detailed Billing Report. While this allows for very sophisticated data queries, it also opens the door to potential confusion. One of the subjects we often hear as responsible for this confusion is blended and unblended rates and costs.

In this short video, we’re going to break down the various rates and their components. By the end, you’ll be able to truly understand how your data is presented in your billing file, and more importantly how to make sense of it in Cost Allocation reports.

So kick back, relax, and prepare to get nerdy.

Check out a closeup of the whiteboard and a transcript of the video below:

Blended rates

Hey y’all! I’m Mike, here at Cloudy HQ. Let’s talk about some of the more interesting details from your DBR file—mainly blended rate, unblended rate, blended cost, and unblended cost.

If you’re looking at a full month of data, without any filters on your data, these numbers are ultimately gonna drive the same sum total. However, if you’re allocating your costs across tags and not-set tags, or any other variety of parameters and groupings, these can lead to very dichotomous results, and data that might not line up with your expectations.

Let’s look a little bit further into these formulas and see why.

To start, blended rate is calculated as your on-demand hours times your on-demand rate, divided by your on-demand hours, plus your reserved hours, for whatever usage type in question.

You’ll notice that your cost of your reserved hours is not included in this rate. It’s because these costs are baked into your “injected line item” in your detailed billing report, and included in the “total invoiced cost” column there.

Blended rate is going to drive your blended cost. Blended cost is also known as total invoiced cost in your detailed billing report. This is a function of your rate times the usage quantity, which for EC2 instances will be the number of hours they were alive in the month.

You’ll see here that total invoiced cost for an individual usage type does not include those RI hours, as again, they’re baked into your injected line item. We’ll get into the details of how this spreads across your DBR in just a second.

First, lets look at unblended rate, and unblended cost.

Unblended rate is your on-demand hours times your on-demand rate, plus your reserved hours times your reserved rate, over your total usage hours both on-demand and reserved. You’ll notice that this results in a rate much more indicative of the actual number charged in that hour for whatever that usage type was.

Unblended cost then follows to be unblended rate times your usage quantity, which again for EC2 is gonna be the number of hours you ran in the month.

How does this impact your bill, and what does it do to the numbers? We have here a fictitious 10-hour month where we only run a single M4.xlarge Linux instance. Five of the hours are running on-demand at 25.2 cents an hour, and five of the hours we’re running reserved, with a Partial 1-year reservation, at 14.8 cents.

This meant that we purchased 10 hours of the RI, and only used 5 of them. So in our 10 hour month, we have 5 on-demand hours, and 5 reserved hours. You’ll notice in the “usage quantity” column, each is presented as a single hour (as that’s all it ran), and for the injected line item, you have a total of 5—which represents our unused RI hours. We also have a notation of whether they’re running on-demand, or whether they’re running reserved.

So in turn, let’s calculate our blended rate, our unblended rate, and look at the cost implications.

Blended rate is going to be your on-demand hours time the on-demand rate, over your total hours—not including your reserved hours. So for that, we have these five on-demand hours, all individually running at 25.2 cents, divided by the total 10 hours we’re running in our month—giving us a blended rate of 12.6 cents.

You’ll notice this is below both reserved and on-demand. It’s because of how your cost, again—your blended cost—is grouped in this injected line item, in your blended cost (or “total invoiced cost”) column. Here you’ll see the cost of owning your RIs—which is not included in the blended rate formula.

Moving on to unblended rate, you’ll see for our on-demand hours, we’re being charged the straight on-demand rate. Which again, makes sense, as it’s a direct representation of the usage type cost. And for our reserved hours, we have a pass-through of the reserved rate as well.

What does this look like when you sum the data at the end of the month? It’s going to give you the same total for your total invoiced cost—or blended cost—and unblended cost. But it will not include your injected line item if you’re allocating your costs in a tagged or untagged dataset.
This can have a lot of implications for how you’re trying to summarize or look at your end-of-month view of the world. It’s really important to remember which number you’re looking at, how it’s calculated, what it represents, and if it ties to your use case. Here at Cloudability, we do see pretty much every one, so if you have any questions or want to know more about this, please reach out.


That’s all for now! To catch my next video, be sure to subscribe for updates.

Being in the know feels great