PG&E E9-A versus EV-A calculator using PG&E downloaded data

PG&E E9-A versus EV-A calculator using PG&E downloaded data

I've banged a quick-and-dirty comparison tool together for folks to allow comparing PG&E's current E9-A rate plan versus the upcoming EV-A rate plan.

The basic concept is you download hourly historical usage data from PG&E (doesn't matter what rate plan you were on at the time, you can download E-1 data and the tool will adjust for you), and then optionally add in extra daily charging hours, and the tool will process your actual historical usage data, add in the theoretical car charging time, apply E9-A and EV-A rates for each time slice, and then give you the total you would have paid under each plan.

I haven't bothered adding -B comparisons, but could do so I guess pretty easily.

I haven't bothered adding anything for people with solar who might be generating during the day to offset usage. Adding this would probably be trickier, because you'd have to know what time of day how much was being generated. That data I guess might be in your PG&E downloaded data but since I don't have solar I have no example to look at. Happy to look at someone's data if they do have net metering to see if I can extract solar generation and use it.

Anyway, for me, it looks like EV will be about 30% cheaper than E9, based on my electric usage from 2008 until just before I got my Model S, and then adding 50 miles per day of car driving to that 2008-2013 baseline:

Total E9: 14815.92 Total EV: 8328.86

In other words, if I use electricity going forward like I used it from 2008-2013, but add in 50 miles per day of electricity, then I can expect that over the next 5 years, I'll pay about $14,815.92 under E9-A, or only $8,328.86 if I switch to EV.

The code is here on Github. To use it right now, you kinda probably need to be a computerish person who knows or can figure out how to install node.js

If you're not, and you don't mind sharing your PG&E usage data with me, send me your XML data downloaded from PG&E and I can run the program for you on my machine and give you the results.

Note it's a bit rough around the edges -- if anyone has any feedback, let me know and I'll try and fold it in.

TeslaLandShark | April 30, 2013

Hi Craig,

I can send you my last billing cycle's worth of data. We have solar and I charged our MS the entire month with scheduled charging time set to 12:10am. Can you give me your email address or email me at

Thanks, Dave

Bob W | April 30, 2013

Does your code take into account the rate "Tiers" that are part of E9-A? With 50 miles of driving per day, the Model S daily electric requirements will easily exceed the typical PG&E "Baseline" allowance of 11-12 kWh per day for your entire home. In effect you only get the cheapest $0.04-0.05/kWh rates for the first week or two of your billing cycle, because after that you will be charged according to the much more expensive Tier 3 or Tier 4 rate plans.

In a spreadsheet I did comparing E-9A to EV-A, it looks like I'll only be saving about $10 / month when EV-A replaces E-9A, even though the rate tiers are eliminated in EV-A. That's because the cheapest rate goes UP to $0.10/kWh with EV-A, vs. $0.04/kWh with E-9A.

I only drive about 40 miles per day, but my PG&E rates (on EV-A) have gone up about $90/month since purchasing the Model S. It's cheaper than what I was paying for gas, but not exactly a bargain. My monthly cost per kWh on E-9A is averaging about $0.14/kWh, despite using only off-peak hours to charge the Model S.

craig.tesla | April 30, 2013

Yes, it takes account of the baseline rates. You need to tell it what baseline region you're in (I'm in San Mateo County, below 1,500 ft altitude, so that makes me zone "T"). You can get your region from this:

I haven't found a way of converting easily from a service address to a baseline region code; it's possible PG&E has some such lookup feature but calculating it myself is next to impossible given the way the descriptions are written. It should be pretty easy as a human to determine what your code it though. It might even be printed somewhere on your bill; I haven't looked.

You're on EV-A already? I didn't think that was available yet. I just switch to E9-A a few weeks ago and asked about EV-A and they said "not yet rolled out" or something.

craig.tesla | April 30, 2013

From my own data, WITHOUT the tesla, I'd expect to pay $7.99 per day for just my home usage under E9-A and only $4.78 per day on EV-A (on average, year-round).

With the tesla recharging 50 miles per day every day at midnight, the numbers go to $11.56 for E9-A and $6.50 for EV-A. The tiered use on E9-A pushes a lot of home-use into the higher rate bands during the day earlier in the month. I always end the month above 200% baseline anyway (which is the max rate), but I get there a lot sooner each month with the car charging.

...and while typing this I realized I have a bug in my app -- I was counting the baseline amount as per month not per day. Doh! Need to fix that and recalculate.

asim77 | April 30, 2013

Is there a tool like this for SCE?

craig.tesla | April 30, 2013

Ok, updated the calculation to calculate the baseline stuff better (before I was off by a factor of 30 on baseline usage!):

Without car charging:
E9 per day: $5.66 EV per day: $4.78

With 50 miles per day:
E9 per day: $9.38 EV per day: $6.50

That means that with car charging, EV rate would be about 70% for me of E9 rate. Even without the car charging, I'd be better off on EV than E9 too.

craig.tesla | April 30, 2013


I dunno if they have the same "download your data" thing that PG&E has. PG&E seems to be using some kind of standard format that the feds are pushing. The rate plans for SCE will be different obviously, but the way the code's written, you should be able to plug any similarly structured rate plan in without too much trouble.

craig.tesla | April 30, 2013

There is huge sensitivity based on your baseline region in this. If I were in zone "W" instead of "T", then I'd have:

With 50 miles per day of car:
E9 per day: $7.74 EV per day: $6.50

...and that's with otherwise identical consumption. The baseline numbers vary dramatically though from one region to another. And also vary if you are "all electric", that is you heat with electric. I don't, I use gas, so my baseline's lower. Turns out San Mateo County region "T" has the lowest baseline of anywhere PG&E service covers.

craig.tesla | April 30, 2013

Just for yucks, I now have E1, E6, E7, E8, E9 and EV rates and slightly fancier output formatting:

Rate: E1
Summer Cost: $7010.64 Per day: $11.49
Winter Cost: $9126.48 Per day: $13.58
Total Cost: $16137.12 Per day: $12.59
Rate: E6
Summer Cost: $7185.56 Per day: $11.78
Winter Cost: $8577.94 Per day: $12.76
Total Cost: $15763.50 Per day: $12.30
Rate: E7
Summer Cost: $6686.34 Per day: $10.96
Winter Cost: $8025.64 Per day: $11.94
Total Cost: $14711.98 Per day: $11.48
Rate: E8
Summer Cost: $6959.59 Per day: $11.41
Winter Cost: $7481.49 Per day: $11.13
Total Cost: $14441.08 Per day: $11.26
Rate: E9
Summer Cost: $5582.90 Per day: $9.15
Winter Cost: $6436.79 Per day: $9.58
Total Cost: $12019.69 Per day: $9.38
Rate: EV
Summer Cost: $3752.77 Per day: $6.15
Winter Cost: $4576.09 Per day: $6.81
Total Cost: $8328.86 Per day: $6.50

tommy-tesla | May 1, 2013

This is excellent. I manually edited my usage file to exclude the months I've had my MS so the winter looks cheaper than it is, still the EV plan comes out ahead with or without charging.

I meant to write a similar tool, but procrastinated for a long time. Thanks!

craig.tesla | May 1, 2013

Yeah, I'm thinking of adding a date range to the "-m" option so you can have it add car charging only for time periods where you weren't actually charging a car and leave real charging data as-is.

Bob W | May 1, 2013

The 30% advantage for EV-A vs. E-9A still seems way too optimistic compared to my own calculations, where it was closer to $0.01/kWh average savings (about 7%), so something seems wrong with the logic. If the output reports displayed total kWh and/or average price per kWh that would give more confidence in the displayed numbers.

Remember that due to the tiers under current E-9A, it costs far less per kWh compared to EV-A($.04 vs. $0.10) for off-peak charging at the beginning the billing period, and far more ($0.20 vs. $0.10) towards the end. It averages out to only a tiny savings when EV takes effect, which may not happen until December 31st 2014, according to one CPUC document that is somewhat difficult to interpret.

Note also that the data you can download from PG&E doesn't seem to account for the Daytime Savings Time anomaly, where for a few weeks of the year you don't get off peak charging rates until 1:00 a.m. The downloaded data shows the same cost per kWh at 12:00 am and 1:00 am, which is not correct from March 10th to April 6th.

If you compare your PG&E bill with the MyUsage data I think you'll find that the PG&E electric bill numbers don't agree 100% with the MyUsage numbers.

craig.tesla | May 2, 2013

The relative performance of one plan versus another will depend heavily on your actual usage: do you have A/C; do you use electric or gas for heating; do you have solar generation offsetting some or all of your usage.

I have:

* no A/C
* gas heating, but it's radiant, so there's some energy usage for pumping the water around when heat is on
* no solar
* pretty large house
* pretty large "other" load from appliances, computers, etc

With E9 kicking all the way up to $0.50 in the summer peak, and $0.35 for partial peak summer or winter, if you have much non-car usage that happens during the day, you can really start to pull away from the E9 amounts. But by how much really does depend on your actual usage pattern, which is why I'm working on the tool.

And yes, there are some issues that I'm not addressing in detail like that one-hour oddity. Or that right now I just assume your billing cycle (and baseline usage calculation) resets on the first of each month. But if you're looking at 4 years of data that don't have car charging starting at 00:00 which would make a potential difference for DST stuff, then the little bumps should mostly even out. The monthly numbers won't match bill-for-bill to your statement, but they average is pretty close. That's partly why I've added E-1, E-6, E-7, and E-8 so that you can get a sense for whether the numbers are totally out of whack based on what your bills actually were monthly.

The concept of calculating and average $/kWh is a good one -- I'll add that to the report

craig.tesla | May 2, 2013

Here's the E9 & EV breakdown for my data including the average $/kWh:

Rate: E9
Summer Cost: $5582.90 Per kWh: $0.23 Per day: $9.15
Winter Cost: $6436.79 Per kWh: $0.20 Per day: $9.58
Total Cost: $12019.69 Per kWh: $0.21 Per day: $9.38
Rate: EV
Summer Cost: $3752.77 Per kWh: $0.15 Per day: $6.15
Winter Cost: $4576.09 Per kWh: $0.14 Per day: $6.81
Total Cost: $8328.86 Per kWh: $0.15 Per day: $6.50

...looks plausible to me.

Bob W | May 3, 2013

Thanks for adding the new data. I use almost no electricity during peak hours, winter or summer, so that probably explains why your hourly cost per kWh under E9 seem so much higher than mine.

The tricky part is figuring out when the rates change due to baselines. Unfortunately, the baseline numbers are expressed in kWh per day instead of per month. In my case I get 11.7 kWh per day "baseline" rate (winter), which means as soon as a total of about 30 * 11.7 kWh are used up in the billing period, the higher cost per kWh kicks in. Does your program calculate things that way for schedule E9?

I think it's great that Schedule EV will eliminate all this complex baseline nonsense; I just wish the "off-peak" rates were a lot lower than $0.10/kWh, and that Schedule EV were available a lot sooner.

I just noticed that as of May 1st, the "MyUsage" charts show that the baseline usage was reset back to 0, even though my billing period starts in the middle of the month and I was already up to Tier 3 rates, approaching Tier 4 rates. It will be interesting to see if my actual bill reflects the same thing.

craig.tesla | May 4, 2013

Yes, I read through PG&E's docs in detail to try and figure out the correct algorithm. The biggest difference I have left in my program vs how bills actually are calculated is that I always start on the 1st of the month, whereas my PG&E bill starts on like the 16th or 17th of the month. It's really just a windowing thing, and if you have enough months in the data set, then overall you won't be off by much, but each individual month will be different cos it's covering a different set of days from reality. That's the next thing I'm going to fix. The daylight savings thing I fix by in real life just setting my car to start charging not at midnight, but at 1:05am -- then even during PG&E's weird DST switchover weeks, I'm still fully off-peak in real life.

On the MyUsage charts by the way, my baseline resets on my billing cycle date. When you switch to "month view" though, I think it shows you the billing month, not the calendar month, so it looks at first glance like it's resetting on the 1st.

Bob W | May 4, 2013

In the MyUsage charts, I am seeing my baseline reset not only on my billing cycle, but also on May 1st, the start of the summer rate period, which happens to be in the middle of my billing cycle. Do you think this is really how PG&E charges us? Does everyone's baseline usage really get reset to 0 on May 1st? I don't trust the MyUsage charts for E-9 once I noticed that they did not get the DST anomaly plotted correctly.

Your program doesn't need to be concerned about this billing cycle complexity if everything is calculated by calendar month, but if you enhance it to account for billing cycles, then it will get tricky.

Here's the PG&E Billing Cycle reference for 2013 in case you need it.

I wish I had understood the DST anomaly when I was manually starting all charges at midnight, thinking that always guaranteed me the cheapest rate on E-9. Ugh. I'll never do that again. 1:05 am is a far better choice.

astrotoy | May 4, 2013

I read the E-9A materials and then spoke to a PGE rep about the DST anomaly. She couldn't explain it. I just took the safe path and started my charging at 1AM. Lucky I am retired and can go to bed late. However, it is even better now that I can set the time of charging to 1AM, which I am keeping, even though I think midnight should be OK.

What I understand about the switch to May 1 is that prorates the amount of baseline between winter and summer rates, depending on how much of the May 1 and after is in the April-May billing, same with October-November on the other end.

craig.tesla | May 6, 2013

Bob W: lol @ PGE meter reading schedule. Thanks for that link; I didn't have that, and it'll help. I was doing a mongrel thing where you download the detailed data as well as the summary data, then I'd first read the summary file to figure out the billing cycle, and then the detail data to calculate things.

The baseline data might well reset mid-cycle when you cross from summer -> winter and back again, but probably the baseline will be based only on the relevant number of days. That is, it'll be the daily baseline times 15 days if it resets after 15 instead of 30-ish.

Pretty much the only reason I'm trying to deal with actual billing cycles is as a sanity check: you can then run the program and it SHOULD output more or less what you bills actually were, historically.

craig.tesla | May 6, 2013

Looks like the 2012 schedule is here: but I don't think they have any older schedules posted online, sadly. My historic data goes all the way back to 2008, so I may have to use the billing-summary method to establish older cycle dates.

EDH AL | May 6, 2013

You guys make my head spin, but I love it when utility rate schedule buffs talk dirty!

sq1mike | May 6, 2013

PG&E rep told me last Friday that EV rate schedules should be available in mid July (moved back from June 1). It looks to me that PG&E intends to move people automatically from E-9A to EV-A, as the E-9 schedules were experimental. Does anyone else have the same understanding? I have solar and just changed from the old E-7 schedule (I was grandfathered in) to E-9A; hope I made the right choice because I can't go back....

shs | May 6, 2013

My understanding was that the EV-A rates would be available on June 1 (now July?) but those on the E9 rates could remain on the E9 rates until 2014 or could switch to EV-A when it became available. In any case the E-9 rates would be phased out in 2014 and all E-9 rate users would be moved to EV-A at that time.

craig.tesla | May 7, 2013

Yeah, you can choose to stay on E9 until December 2014, if you want to. For me, the numbers are strongly in favor of switching over ASAP. If you have a largish house that has a fair amount of daytime non-car electrical use, then the same is likely true for you too. If you don't use much during the day and/or generate some of your own power during the day to offset use, then you might well be better on E9 for as long as they let you, and then switching to one of the "regular" non-EV time of use rates -- for some of the folks whose data I've run through my calculator, E-6 turns out better than EV.

craig.tesla | May 18, 2013

I've enabled the web-server version now so people can try it out themselves.

For instructions on the files you need to download from PG&E to feed to the program, you need to read the readme here:

I'll copy the relevant parts to the website at some point...

Schlermie | May 19, 2013

I received my April/May PG&E bill with the Summer E9-A charges this week. When you plug in the proposed Summer EV-A rates, the electric charges went from $110.85 (E9-A) down to $81.41 (EV-A)...a 27% reduction.

I don't know is the proposed EV-A rates are valid any longer though. They were proposed over a year ago (May 9, 2012). They may not be comparable to the 2013 E9-A rates any longer.

Bob W | May 20, 2013

Thanks for putting this calculator online Craig! It's much easier to work with now. One suggestion: output the results in a Courier font (text), or offer a text file "download results" option to make it easier to paste results into this list. I had to manually format the columns below.

I still think something is wrong with the calculations. Entering a car install date of 12/27/2012, rate schedule X (nice map), and uploading both .XML files, and 26.5 miles per day, it displays:

Rate: E1
Summer Cost: $1006.96 Per kWh: $0.21 Per day: $4.94
Winter Cost: $735.46 Per kWh: $0.15 Per day: $3.85
Total Cost: $1742.42 Per kWh: $0.18 Per day: $4.41
Rate: E6
Summer Cost: $981.59 Per kWh: $0.21 Per day: $4.81
Winter Cost: $609.60 Per kWh: $0.12 Per day: $3.19
Total Cost: $1591.19 Per kWh: $0.17 Per day: $4.03
Rate: E7
Summer Cost: $873.30 Per kWh: $0.19 Per day: $4.28
Winter Cost: $517.54 Per kWh: $0.10 Per day: $2.71
Total Cost: $1390.83 Per kWh: $0.14 Per day: $3.52
Rate: E8
Summer Cost: $1000.73 Per kWh: $0.21 Per day: $4.91
Winter Cost: $497.65 Per kWh: $0.10 Per day: $2.61
Total Cost: $1498.38 Per kWh: $0.16 Per day: $3.79
Rate: E9
Summer Cost: $719.64 Per kWh: $0.15 Per day: $3.53
Winter Cost: $371.21 Per kWh: $0.08 Per day: $1.94
Total Cost: $1090.85 Per kWh: $0.11 Per day: $2.76
Rate: EV
Summer Cost: $677.17 Per kWh: $0.14 Per day: $3.32
Winter Cost: $634.13 Per kWh: $0.13 Per day: $3.32
Total Cost: $1311.30 Per kWh: $0.14 Per day: $3.32

Which shows that EV-A will cost me 20% more?! If I enter 50 miles / day, then costs are about even.

Note however that my actual bills on E-9A show an average of about $0.15/kWh during the Winter months since I've owned the Tesla, not $.08/kWh, so I don't know how the program came up with such a low number for Wionter Cost. I'm exceeding baseline halfway through the billing cycle now, average 28 kWh/day since I've owned the Tesla.

Is the program averaging all the bills and detailed data from the prior 4 years / last 12 months instead of just using the data since 12/27/2012? I gave it 12 months of detailed bills to work with. I got nearly the same cost per kWh uploading only the last 4 months of detailed data (but the total yearly cost went down by 66% since the program doesn't "extrapolate" 4 months of data to 12 months).

Maybe you could add "total kWh/month" to the report as a further sanity check?

Thanks for your patience.

craig.tesla | May 20, 2013

The program uses all the data from the period covered by the detailed data. It only uses the summary data to get your meter reading dates, so it can more accurately determine when your baseline usage resets each month, which is especially important when you only have a little bit of data (turns out lots of folks are only now getting smart meters, and may only have a month or two of hourly data).

The "totals" in the first column are the total for the entire detail data period, so in your case, it looks like it's just about exactly a year of data.

The "date you purchased your car" is used as a gate for when to add the "extra" charging for miles * Wh/mile. In other words, in your case, you have detailed data going back to May 2012. I add a daily recharge of your 26.5 * 380Wh (for 85) or 320Wh (for 40/60) or I forget what for the Leaf, up until 12/27/2012, and thereafter add nothing, because your actual logs include the actual charging for your car (which might in reality be more or less than an average of 26.5 miles).

I'm guessing, looking at your data, that you have a fairly substantial AC system that's using a lot of power in the summer, and that you heat with gas in the winter. Since AC use is mostly daytime, the time-of-use E9 plan will lose versus EV. When you add an extra ~9kWh per day of charging, that pushes EV into higher tiers faster, and maybe that's why they're pulling closer together?

I don't log the data files that are uploaded, but if you want to send me your XML files by email, I'd be happy to take a look and debug/make sure nothing funky's going on. I can easily on my end print out a lot more detailed breakout about On-Peak vs Off-Peak etc which might clarify the E9 costs. If I come up with anything enlightening, I could then add it to the web version.

And re: fixed-width font; I had that originally, but it looked a bit uglier. The CSS-based alignment I came up with I wasn't entirely happy due to as you say, poor copy-paste performance. I was debating doing it as an HTML table instead, which just felt very 1990s-y. I might switch to a table with some nice CSS to prettify it or something. Then it should copy/paste a little better.

craig.tesla | May 20, 2013

And I should probably remove that "total cost" thing, cos it's kind of meaningless -- instead I could just put the total number of days covered or something, which is really what I use that for when I'm looking at the results. Small numbers mean "not enough data; results probably not reliable".

rwang | May 20, 2013

I'd love to see the solar panel install calculator vs PG&E rates on E9 over 20 years. If anyone has any free time =)

lov2krz | May 20, 2013

CraigHughes, I don't have a smart meter yet and I'm on EV-6. I have all of my detail sheets but not in spreadsheet format. How would I enter my usage data into your calculator? You can private email me at my LOV2KRZ ID in the TeslaMotorsClub website otherwise post here.


Brian H | May 21, 2013

The "pre" tag works fairly well here.

craig.tesla | May 21, 2013

...except the "pre" tag makes everything come out in an ugly monospaced font, which is what I was trying to avoid. The pre tag is in fact what I was using in the first place. But it's ugly.

Bob W | May 22, 2013


Thanks for the explanations.

You are correct, I use A/C in summer and have gas heat.

I will be happy to send you my PG&E XML files, but I need your email address (I sure wish this forum had Private Messaging).

In the mean time you can view the shared Google Spreadsheet I created to do my own E-9A vs. EV-A cost comparison. The most interesting data is on the last line of each Monthly sheet. Each takes a while to load as most sheets have >700 lines, so you may have to press Ctrl+End a few times to really get to the bottom of the page.

As you can see, EV-A will barely reduce my average to about $0.13/kWh, which is no bargain. And that's mostly using Winter data; I think by summer things will get much worse.

One anomaly I see in my raw XML data is that some of my entries have no associated tag. If your program resets cost to 0 at every iteration, that could substantially affect the results.

See an example below. The first includes a tag, but the second one doesn't:






I think the readings without any value mostly correspond to my partial billing period from 12/30/2012 to 1/14/2013 which is just after my cutover from E-6 to E-9A. So perhaps the program could just ignore any interval reading with cost=0? I don't have any solar if you need to know that.

I found problem after writing my own Python program to convert this XML data to something I could import into the Google Spreadsheet. PG&E's .CSV files are easier to import, but they don't provide nearly as many significant digits of data as the .XML file for some reason.

BTW, did you notice that the Unix Timestamps above are all in UTC, and need to be converted to local time to get the correct time and rate values? Good thing all PG&E customers are in the same time zone.

After staring at all this data for far too long I've come to the conclusion that PG&E's XML data doesn't perfectly match our actual bills, especially during the "DST anomaly" period from March 10th to April 7th, 2013 (inclusive?) when the cheapest rates actually start at 1 am instead of 12 am. You won't see that in the PG&E MyUsage data because their programmer apparently didn't want to account for that complexity, but the billing folks sure did.

This DST thing is something the CPUC should never have approved IMHO. I wish they would get rid of it in Schedule EV as well.

Bob W | May 22, 2013

Sorry, looks like HTML "code" tags don't work in this Forum as documented. Let me try to re-post the part that didn't make it properly:


One anomaly I see in my raw XML data is that some of my IntervalReading> entries have no associated cost tag. If your program resets cost to 0 at every iteration, that could substantially affect the results.

See an example below. The first IntervalReading includes a cost tag, but the second one doesn't:






I think the readings without any cost value mostly correspond to my partial billing period from 12/30/2012 to 1/14/2013 which is just after my cutover from E-6 to E-9A. So perhaps the program could just ignore any interval reading with cost=0?


Bob W | May 22, 2013

Oh great, even the HTMLpre tag can't handle embedded angle brackets on this site. Last try, with angle brackets changed to square brackets:


(Appreciate your patience folks)

Brian H | May 23, 2013

Angle brackets have to be coded. Use the ampersand+lt+semicolon for < and ampersand+gt+semicolon for > 4 char each, no spaces.

craig.tesla | May 31, 2013

I actually ignore the "cost" field, and only look at "start" and "value". I make the assumption that every duration is 3600, and ignore those too. I adjust form GMT to US/Pacific time, but do not include the calculation for the DST anomaly. I agree CPUC should tell PG&E that might have made sense back when their meters weren't smart, but nowadays, computers can add an hour for daylight savings time on the correct day...

Bob W | May 31, 2013

The cost field divided by the value (kWh) indicates what your old cost per kWh was, for each hour, and this is supposed to include the 4-tier rate structure (baseline usage, 100-130% of baseline, 131-200%, and >200%.).

How does your code adjust for these tiered rate schedules when calculating cost per kWh for E-6 or E-9A? If it's only done on the total usage for the billing cycle, that could account for the discrepancies I'm seeing.

Let's say there are 30 days in a billing cycle, and your Winter baseline allowance is 11 kWh per day. Once you exceed 330 kWh of usage in that billing cycle (a cumulative total), the rates jump from that point forward in time, then they jump again when you exceed 429 kWh (130% of baseline). Does your code keep a cumulative sum to try to account for these tiered jumps, hour by hour, or does it just use the total kWh usage for cycle? If the latter, that could explain why the numbers don't seem right to me.

At least Schedule EV will get rid of the confusing usage tiers, which no is very hard to understand.

In my Google Spreadsheet, I added a "% of Baseline Usage" column, but the MyUsage data cost per hour data doesn't quite agree with the 100%, 130%, and 200% limits exactly. I'm really quite confused now about how the Tiers work. The data seems to indicate that PG&E put me in a new "tier" at different times, the peak and partial-peak tiered rate jumps seems to be happening a different times. If anyone can explain this, I'd really appreciate it.

craig.tesla | June 3, 2013

It keeps track, hour by hour of the usage in the cycle. If you upload a "summary" data file, it uses that to identify the billing-cycle dates from your bill. If you don't upload summary data, it assumes a billing cycle that start on the first of each month. I also use hour-by-hour data to determine the rate at any given point, including when switching over from summer to winter and winter to summer. I don't reset the baselines at that point, but I don't think PG&E does either (though it's not 100% clear).

I could use and ask the user to select what their "Read cycle" is, but I haven't thought of a user-friendly way of doing that yet, other than just uploading your summary data file. The "read cycle" code is probably on your paper bill somewhere; I haven't checked.

Bob W | June 3, 2013

The Baseline usage is apparently reset on May 1st, as indicated in the May 2013 tabin my shared Google Spreadsheet, which I just updated to correct a reversal of Winter and Summer baseline usage allowances, so now the Tiered rates reported by PG&E seem to be change closer to when I expected them to.

For my Schedule X, the baseline is based on 11.7 kWh/day (Winter) and 11.0 kWh/day (Summer), and it's "pro-rated" for the number of days in each billing cycle. So for me there were 15 days in the Winter cycle and 15 days in Summer, so baseline is exceeded "early", at 15*11.7 = 175.5 kWh for the first part of my Billing Cycle, then resets on May 1, and then I get a baseline allowance of 15*11.0 = 165 kWh for the second part.

At the bottom of the sheet you can see that the actual bill total (before taxes) doesn't quite match the total cost I get when adding up the MyUsage cost data, hour by hour, but the kWh total matches quite well. Clearly PG&E's own programmers can't agree exactly on how they charge us for electricity, hour by hour!

I re-ran your Javascript uploading only one billing period: 2/14/2013 - 3/17/2013, plus all the summary data. My actual electric bill on E-9 before taxes was $132.28, but the Javascript reports:

Rate: E9
Summer Cost: $0.00 Per kWh: $0.00 Per day: $0.00
Winter Cost: $76.94 Per kWh: $0.08 Per day: $2.40
Total Cost: $76.94 Per kWh: $0.08 Per day: $2.40

So the code seems to be way off somewhere. I paid an average of $0.14 per kWh during that period not $0.08 / kWh.

If you provide me an email address I can send you my XML files or if the JavaScript code optionally output hourly cost details instead of grand totals I could spot the discrepancy myself.

craig.tesla | June 6, 2013

At a guess, I'd say maybe the summary data's meter reset dates aren't working and it's assuming a meter reading reset on 3/1 so it's counting two half-months instead of a full month. I would appreciate your data files so I can debug and fix whatever's up. You can email me at

Bob W | June 6, 2013

FYI, PG&E recently upgraded their online Plug-in Electric Vehicle Calculator, so now you can use their tool to compare E-1, E-6, E-9A and the new EV-A rates too, in many combinations. You can even select the Tesla Model S 85/60/40 as your EV. :-)

Be sure to select the << Advanced Options link on the right hand side. If you run the numbers more than once, you have to keep re-entering your current usages values (before EV) to get accurate data, as the numbers seem to change on their own.

For me, the PG&E calculator shows very little advantage between EV-A and E-9A at 33 miles of driving per day, but at 50 miles per day, schedule EV-A saves me $10 a month? Hmmm.

After running the numbers, click the big Save Results(PDF) button at the top right to save a detailed report.

PG&E electricity still seems quite expensive compared to other utilities like Silicon Valley Power, SMUD, etc. Maybe solar is the only way to go, but there are big upfront costs, kind of like buying the Model S. :-)

Schlermie | June 6, 2013

Thanks for pointing out the update. The EV-A rates actually seem to work out better than the EV-B rates now.

cool_sni | June 6, 2013

I have a solar installed in my residence and my electricity bill show E 1XB/NEMS
Is anyone on this plan, Do I need to change from this plan to something else once get my Model S.

Brian H | June 7, 2013

Please don't post copies in multiple threads. It snarls things up.

craig.tesla | June 7, 2013

Yeah, I noticed the new stuff on the PG&E estimator thing a while ago. But their estimator makes you guess at what you think your usage is on average winter vs summer, but that's not super helpful in determining your cost under time-of-use plans where you need to know whether it's peak or off-peak. It'd be nice, since PG&E actually has your hour-by-hour data, if they told you what you would have paid for YOUR ACTUAL SITUATION under the various rates.

vincent1001 | June 8, 2013

I charge my MS in office, Monday to Friday. It gives me free driving on weekdays. I only charge it at home on Sat. and Sun. And average is only 35~40kWh total during the weekend charging at home. Of course, I always charge it from 12AM to 5AM. I have E1 now. For my case, do you think it's still worth to apply EV9A ? Or probably stay E1 is better ?

carlf9121 | June 8, 2013


Since you only consume 35~40kWh total over the weekend, if what's left in your battery pack is enough to reach work from home on Mondays, then you don't need to recharge at home. Wait unti you get into work every Monday morning to recharge your battery pack from your weekend drive.

I plan to do the same once my company installs a charging station in the coming month.

Food for thought...

vincent1001 | June 8, 2013


That's what I do now. I only charge on Sat. midnight and Sun. midnight at home. Then start to charge at office from Monday trough Friday. I am trying to calculate if EV9-A will save some money for me based on current situation. It looks like EV9-A costs more to me during weekdays compared with E1 because I do not charge during weekdays. And EV9-A does not save much on weekend compared with E1. Overall, EV9-A seems cost more since it has peak hours charge.