Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

How to buy a CPO or New Tesla on the cheap(ish) -- With spreadsheet and script

This site may earn commission on affiliate links.
Buy a Tesla Model S on the cheap(ish)
1*iqxAlzmSlyDREam_B4IOZg.jpeg

Picture of Tesla Model S © Al Abut under (CC BY-SA 2.0)[1]

Why
I am not going to tell you it’s more efficient, greener, the world is a better place with it. That may or may not be true, I haven’t done the requisite amount of research required to make a decision about that either way. I’m not going to tell you it’s cool. It is, however, cool to me.

The only reason I want to buy a Tesla Model S is because of the autopilot. The sheer magnitude of awesome that it represents is mind-boggling. The car drives itself. Let me say that again. The car drives itself! Twenty years ago, a self-driving car would have been the stuff of dreams and science fiction. Today it’s (semi) mass produced and ready to be availed of by all. And I want it.

The Autopilot, I had heard, can drive the car while you sit in the driver’s seat enjoying the scenery whiz past. Despite the vagaries of rush hour traffic, Tesla’s autopilot ensures that the driver won’t have to drive through it using the Gas -> Brake -> Rinse -> Repeat algorithm. Moreover, being able to drive to and from work is infinitely more convenient in the US, unfortunately, than taking public transit.

With this in mind, I decided to splurge and buy a (pre-owned) Tesla. Even a pre-owned Tesla Model S with Autopilot can run about $70k, so I wanted to be very very careful about which vehicle I bought.

How
To my horror, Tesla’s CPO website is worse than BART and the Bay Area traffic congestion put together in terms of generated frustration. It has no filtering; no way to query for a certain type of vehicle with certain features. The most you can do is choose between the Model S and the Model X. Basically, Tesla’s website is only to let you know that there actually is a CPO program. However, there are third party sites like ev-cpo.com and teslainventory.com that allow you to search for the Tesla you want, the way you want it. If you’re looking for a used Tesla, you need to go to these websites. They are really awesome!

A better how
However, these websites don’t give you a clear picture when it comes to the total cost out-the-door and what sort of monthly payments you’d have to make if you put in X dollars as down payment. Being a thrifty — ahem — individual, I wanted to be able to compare the multiple vehicles that were available on the above websites and also compare a vehicle’s monthly payment if I changed my down payment values.

I decided to make a spreadsheet. One spreadsheet to rule them all. One that would take into account what state you live in, what state the car is in and whether you’d have to pay a transportation fee, what would your monthly payment be if you made a downpayment of $20,000 as opposed to a downpayment of $10,000, etc. I’m proud to say I’ve made a pretty nifty tool. I’ll paste the link at the bottom. This spreadsheet freed me to look at pricey cars and semi-pricey cars while considering various aspects like mileage, year etc.

A better better how
The spreadsheet was great. However, it still involved a lot of copy pasting and remembering stuff that I didn’t want to copy paste and remember. Being the lazy programmer I am and absolutely not satisfied with just having to manually plug in the values for each car in the spreadsheet, I came up with a TamperMonkey script. This script works in conjunction with the spreadsheet. When you go to a Tesla CPO car’s detail view page, this script copies all the relevant details to the clipboard. It will even show you a small “done” button in the top right corner when the data is ready to be pasted. Then all you have to do is go to a fresh line on the spreadsheet and paste and voila, you have that car’s details and a pretty good rough estimate of what it’ll cost you.

Bottom Line
Using the TamperMonkey script in conjunction with the Google Sheets spreadsheet let me do the actual agonizing over the cars’ details. This had a profound effect on my ability to make the best decision about which car to buy.

If you’re in the market to buy a used Tesla Model S, check out the spreadsheet at the very least. If you’re in the market to buy a used Model S on the cheap, download and run the script. You’ll be glad you did!

An explanation of how it all works

The spreadsheet is here:
Tesla

This is my spreadsheet, so you can’t have it! I mean you shouldn’t change the values in my personal spreadsheet. I’ve shared it to whoever has access to the link. However, you won’t be able to change any values in it. To do that, you’ll have to make a copy in your own Google Docs account like so:

1*HfAOnvSBHBtH-Z5uYt97zw.png

Once you’ve made a copy, you’re free to edit it. Near the bottom of the spreadsheet, there are two worksheets, one named “Main” and the other named “Start Here”. I’ll let you decide where to start! (Seriously, start at “Start Here”.)

Once you have plugged in the details in the Start Here worksheet, go to the Main worksheet. Here, you’ll have to manually plug in all the values until before the Free transport States… column.

You may not be able to plug in the value for the free transport States because that is a hidden value on the Tesla CPO page and is scraped by the TamperMonkey script.

To use the script, you’ll first have to install TamperMonkey on the Chrome browser, available here: Tampermonkey (open from within Chrome for best results).

Once installed, it will start showing on the top right corner of your Chrome browser with a TamperMonkey icon.

1*5z0jUSSzPym-9a4misdJfg.png

Click on it, you will see a menu like so:

1*LfH1--LP7dqNWM1oYPNwXg.png

Click on “Create a new script…” This opens a new tab with a script editor.

Copy the script from my google drive here: tesla_script.txt

And paste it in the new script editor like so:

1*xm51lvFR3l2UUibNJ6RpbA.png

TamperMonkey Tesla scraper script
Press Ctrl+S (Command + S on Macs) to save it.

Now, if you go to any Tesla CPO detail page, you should see a small button on the top left corner that says “Done”.

1*nvRHN34zVHHSIYS5sz7Prw.png

Done on top left indicates TamperMonkey script is running and was successful in scraping the details for this car
Once you see “Done” you can go back to the spreadsheet’s Main worksheet, find a new line and just paste. Yes, just paste! Pro tip, this script also works on new cars!

1*VBaz_IQwS7EDTtnrQwaexw.png

Pasted values on left give results on the right
 
Isn't the deposit amount just applied against your down payment when you finalize the purchase? You seem to be subtracting it from the purchase price of the car up front and reducing the taxable amount by the deposit.

Also, shouldn't the destination and doc fee of $1200 be included in the NEW purchase price?
 
Isn't the deposit amount just applied against your down payment when you finalize the purchase? You seem to be subtracting it from the purchase price of the car up front and reducing the taxable amount by the deposit.

Also, shouldn't the destination and doc fee of $1200 be included in the NEW purchase price?

Good catch! I'll add the $1200 for new cars.

For the deposit/order payment I was thinking that since you already put in the $1000 for the CPO/$2500 for the new car, it would not figure in the price. Now I'm a bit confused as to where it should be subtracted from!
 
Good catch! I'll add the $1200 for new cars.

For the deposit/order payment I was thinking that since you already put in the $1000 for the CPO/$2500 for the new car, it would not figure in the price. Now I'm a bit confused as to where it should be subtracted from!

Okay yes now I remember, I am deleting it from the Subtotal because if you've paid it by credit card, it won't be financed. The delivery fee should not be subtracted, though.