WooCommerce: Import California Tax Rates (.csv)

It took me ages to find a way to import ALL California tax rates into WooCommerce. I started by hand, and after a while I said to myself “California is crazy! I wouldn’t want to be an accountant there!”.

As usual, I looked for existing free and premium plugins, but I decided to do it my way. this tutorial gives you a ready-made CSV with all California US tax rates (as of 9 August 2014). Yes, it’s out of date, but you can download it, see how it is built, revise it with the correct rates, and follow the tutorial.

Option 1: “Automated tax calculations” (2018)

As of 2018, WooCommerce enabled “automated tax calculations” for certain countries, US included. Maybe, you don’t need to do the manual CSV import any longer.

All the info are here: https://woocommerce.com/posts/woocommerce-sales-tax-for-the-us-how-to-enable-automated-calculations-and-filing/

In a nutshell, go to Settings > Tax > Automated taxes > Enable automated taxes and you won’t need to set up taxes manually. Follow the tutorial above as you’ll need a free plugin, as well as Jetpack, in order to make this work.

Option 2: Import taxes CSV in WooCommerce (2014)

1) Go to WooCommerce / Settings / Tax / Standard Rates

2) Click on “Import CSV”

Import Taxes in WooCommerce
Import Taxes in WooCommerce

3) Select the CSV file that you can download below

4) Click on “import” – and there you go! A lot of work saved with a free, simple file download

Download CA tax rates .csv for WooCommerce now

1) Click on the file below

2) If you appreciate my help, please click on “Like” and share this post with your colleagues

 

Forgot, here’s the .csv file: CA_tax_rates.

Enjoy!

Where to add this snippet?

You can place PHP snippets at the bottom of your child theme functions.php file (before "?>" if you have it). CSS, on the other hand, goes in your child theme style.css file. Make sure you know what you are doing when editing such files - if you need more guidance, please take a look at my free video tutorial "Where to Place WooCommerce Customization?"

Does this snippet (still) work?

Please let me know in the comments if everything worked as expected. I would be happy to revise the snippet if you report otherwise (please provide screenshots). I have tested this code with Storefront theme, the WooCommerce version listed above and a WordPress-friendly hosting on PHP 7+.

If you think this code saved you time & money, please join other Business Bloomer supporters and avail of 365 days of WooCommerce benefits. Thank you in advance :)

Need Help with WooCommerce Customization?

Check out these free video tutorials!

  • how-to-edit-woocommerce-with-php-snippets
  • woocommerce-hooks-add_action-list-visual
  • woocommerce-customize-single-product-page-PHP

Rodolfo Melogli

Author, WooCommerce expert and WordCamp speaker, Rodolfo has worked as a WooCommerce freelancer since 2011. His goal is to help entrepreneurs and developers overcome their WooCommerce nightmares. Rodolfo loves travelling, chasing tennis & soccer balls and, of course, wood fired oven pizza.

36 thoughts on “WooCommerce: Import California Tax Rates (.csv)

  1. Hello Rodolfo. Could you please update the SVC file with the 2019 rates? I will donate. I’m sure this will be very useful for others and they will donate, too.

    1. Diana, thanks for your comment! I’ve updated the blog with a new section on “automated tax calculations”, take a look 🙂 There is no need for a CSV any longer I believe

    2. Super thanks for doing this.

      1. You’re welcome 🙂

  2. For some reason this didn’t really work the way it should for me, instead of putting 8.5 as the tax as it was on the spreadsheet, it would round it up to 9.

    1. Hey Ana, thanks for your comment! this is an old post and old CSV, so rates might even be wrong. Try creating your own CSV by following mine and see it that one works 🙂 Let me know!

  3. You should add dates to these articles

    1. Jessa, thanks for your comment! Sure, will do. Did you find this blog out of date?

  4. Thank you so much! This helped me out tremendously.

    1. You’re welcome 🙂

  5. Hey guys! I actually have the up-to-date sales tax. The problem is getting it to work in WooCommerce. California charges a flat state sales tax; however there is additional tax applied to specific counties, and in some cases – even a city tax. The problem we’re running into is this: certain ZIP codes have (2) different tax rates, depending on the CITY they are located in (crazy right).Any idea how to account for this in WooCommerce?

    Also, if you would like to see my spreadsheet (updated 03/17) – email me pj@rankexecutives.com and I would be happy to share.

    1. Thanks Peter!

      In the WooCommerce settings you can add multiple rules (rows) based on either country, state, city, zip. So, in your case, you’d have a line for state, another for county, another for zip and another for the same zip 🙂

  6. Hi Rodolfo – What is the process that you recommend to use to update the Sales Tax Rate CSV files? Looking at the California Board of Equalization Site, it appears that they don’t sort by zip codes and use cities instead. Thanks!

    1. Hey Michael, thanks so much for your question! I’m not able to help in this case, as it’s something that goes beyond my knowledge. I’d recommend asking the same question on Quora or the “WooCommerce Help & Share” Facebook group if you have an account there. Hope this helps!

  7. Thank you for putting these together – are they current for 2016? You are AWESOME!

    1. No problem Mandy 🙂 No, these rates are a bit old, but you can always download the CSV, edit and re-upload to Woo. Let me know, ~R

  8. Hi, Rodolfo.

    Thank you so much !

    1. You’re very welcome Dei! 🙂

  9. You’ve come to the rescue for me again, Rodolfo! Woocommerce was not calculating my sales tax when I was using (*) or 90000-99999 for all my California zip codes. I noticed if I entered a specific zip code, the tax would correctly calculate and display. The thought of manually entering 2500+ zip codes or purchasing a tax table was painful but thanks to you — the best Woocommerce friend anybody could ever for — I solved my problem in 2 minutes. If you’re ever in Los Angeles, I’d love to buy you a beer my friend!!! Thank you!

    1. Ahah Patty that’s awesome to hear 🙂 And I’ll definitely take you on the beer offer. I lived in San Diego 3 years ago so you never know, I might be back one day!

  10. by chance you’ll have the tax table of Florida? I’m looking everywhere but charge me or ask me to install unnecessary plugin Thanks

    1. Hey Nelson, thanks for your comment! I’m afraid I don’t, but check Eric’s comment for a recommended service that may be cost effective. Take care 🙂

  11. California has too many tax rates. I admire what you have done for the community Rodolfo. It’s insane trying to keep it up yourself and it’s not really worth of your time. I am a web developer and I use the sales tax rate tables from woosalestax.com for my clients. Tables are light weight and update monthly.

    1. Eric, thanks so much for your kind words and your recommendation! I went to check woosalestax.com and despite it’s a great idea I feel pretty uncomfortable about it – would you know who are the website owners, where they’re based, how long they’ve been in business and who else is using it? As an ecommerce website is missing all the trust factors 🙂 Let me know. ~R

      1. You are welcome. 🙂 I am not sure who the owner is. But I think they are based in Southern California. I have been using their tables for my WooCommerce clients for a year and half now. So they must be in business longer than that. I don’t have time to deal with the rate changes myself and it’s not worth of my time. I did reluctant to use their csv file at first, so I chose their 3 months option and it tested out ok and it did charge tax if customers enter zip+4 (where csv file like yours won’t be able to handle unfortunately). The update is pretty quick since there are not that many rows of tax rates to remove. Their e-mail support is usually pretty quick. They seem to be very knowledgeable on the Tax setup part of WooCommerce. I have used their Tax Setup Service to resolve a weird tax problem I had where I couldn’t save the tax rates I entered to the WC (they said there was a table missing in our mysql database and they had to recreate it). Anyway, I haven’t have any problem with their support and service so far. I do recommend their sales tax rate table for those who don’t want to deal with the rate updates themselves. Cheer! -E

        1. This is awesome Eric, thanks a lot for helping me and the community 🙂 Thank you!

  12. Hey Rodolfo. Any chance you would have gotten to the updated CA tax rates for Woo? If so, would be willing to donate some $, as it would save us a bunch of time. Thanks!

    1. Hey Luke, thanks for your comment 🙂 I’m afraid I haven’t updated the CSV file recently, and I don’t have the new ones. Do you have an excel available?

  13. I want to make a donation but the Fiverr account says “Gig Paused.” This tax table is awesome and I’ll make another donation for the July Update.

    Let me know how to contribute. PayPal address?

    Art

    1. Thank you so much Art. You can click here to donate: PayPal

  14. Thank you very much

  15. You are the man, thank you so much for sharing this! I’ve been fighting with some of the CSV tax lists posted by the state, but they wouldn’t upload. This worked like a charm!

    1. I hope you’ll be providing an updated CSV when the April 1st tax changes go into effect!

      1. Maybe if someone is willing to get me a coffee I’ll do it 🙂

Questions? Feedback? Support? Leave your Comment Now!
_____

If you are writing code, please wrap it between: [php]code_here[/php]. Failure to complying with this (as well as going off topic) will result in comment deletion. You should expect a reply in about a week - this is a popular blog but I need to get paid work done first. Please consider joining #BloomerArmada to ask me 1-to-1 WooCommerce questions. Thank you :)

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.