Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email

Magento Forum

CA Tax Rates
Jr. Member
Total Posts:  1
Joined:  2009-05-15

Hello All,

I am working on our Magento site, version 1.3.1, to try and incorporate CA tax rates based on ZIP code.

Now, I know that the BOE in CA bases taxes on physical location, but according to other posts that I’ve read, the only way that Magento will work with this is to charge taxes by ZIP.

So, I rounded up all of the ZIP codes that correspond to our customers (it is an exclusive e-commerce site), and created tax rates on each ZIP. I then decided to test the rates out and create three rules. Each rule is based on a different ZIP and a completely different tax rate.

When I tried to purchase something through the store, using each of the three different ZIP codes, the tax rules weren’t working.

I disabled the new tax rules and then created a general CA State Tax rate and rule and it works just fine.

How do you set up taxes for individual ZIP codes? Everything that I have read so far indicates that I need to create a unique rate for every ZIP code and then a matching rule. But, with my test using the three unique rates and rules, it wasn’t working.

I am at a loss as to how to get this to work.

We have a very simple store. Only one Tax Class, and only one Customer Class.

Please Help.


Magento Community Magento Community
Magento Community
Magento Community
Jr. Member
Total Posts:  19
Joined:  2008-03-31

You need to go into Manage Tax Rules, then edit the rule your customers are using..  “Retail Customer-Taxable Goods-Rate 1” Here.
Now down in tax rate. Select all valid Tax Zones (the ones you added) by either shift or ctrl clicking.

Magento Community Magento Community
Magento Community
Magento Community
Jr. Member
Total Posts:  28
Joined:  2009-05-22

@ GreenPlumber
Just wondering if you were able to get the taxes by zip code to work.  I’m about to tackle that myself.  Similar to your situation- CA business, one tax class, one customer class.


Magento Community Magento Community
Magento Community
Magento Community
Jr. Member
Total Posts:  16
Joined:  2011-01-25
Los Angeles, CA

I know this is an old topic, but as I’ve seen dozens of posts on this topic with very few answers, and I’m working for a company in Los Angeles, I’d like to offer what I’m planning to use as a solution, one which I have not yet tested.  So feel free to comment and let me know if it’s flawed!

First, I contacted the BOE, and they said there are two ways for an online business to charge tax:
1. “Courtesy Collection” - go to the BOE website, download the giant list of all CA tax rates, and figure out some way to match those to zip codes.  Enter that into Magento, and you’re good to go.  The problem here is that matching to zips will be a GIANT HASSLE.
2. Everyone outside of our district (Los Angeles county) is charged 8.25%, and everyone in our district is charged 9.75%.  Easy.

Obviously, I’m opting for #2.

Here’s what I did: I went to this website——to obtain all the zip codes for California.  I’ve also emailed them, to see how they update things and get a sense of whether or not they are actually a worthwhile resource.  Spot checking about 25 zips seemed to be okay up against and other zip code resources, so I figured I’d go ahead with it.

I copy and pasted them (the zip, city, county) into Excel and sorted everything so that all the Los Angeles county zips were together.

I then did a Find/Replace on anything with “Los Angeles” under the County column, and replaced it with “1.5”

After that, I went into Magento, and did an Export under Sales -> Tax -> Import/Export Tax Rates.  This gave me the default CSV file, which lists a rate for CA and NY.  I did this simply to get the layout of the CSV file for my eventual upload.

So, creating my own version of the CSV file, I have on the first row:

Code Country State Zip/Post Code Rate default
CA_General US CA * 8.25

The idea here is that all of CA is charged 8.25% sales tax.

Then, I simply copied in the information I’d pulled into that other Excel file.  I added some stuff, too, which I’ll explain after you see an example:

Code Country State Zip/Post Code Rate default
CA_General US CA * 8.25
90001 US CA 90001* 1.5
90002 US CA 90002* 1.5
90003 US CA 90003* 1.5
90004 US CA 90004* 1.5
90005 US CA 90005* 1.5

So, this shows that first “generic” CA sales tax line (8.25%), and then shows each individual Los Angeles county zip code adding an additional +1.5%, for a total of 9.75% to all Los Angeles county residents.

I also added a “*” at the end of the zip code in the “Zip/Post Code” column, because this means that the customer can enter that zip code, or the zip+4 version, and still get picked up as adding the 1.5%.

I still have to create the Tax Rules, but this should be easy: if I make sure to assign the same priority to all of these Rates, then they’ll stack together (for a total of 9.75%) in instances where the noted zip codes are used.

At least, that’s the theory.  It seems to jive with what the BOE told me was the way to go, and thanks to some basic computer skills, it wasn’t like I had to type in a billion entries: a few Find/Replaces and Copy/Pastes and away we go!


Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top