Tax is often calculated per item. Especially in the days of the internet, some items are taxable and some aren't, depending on the item and your nexus. I would recommend calculating and storing tax with each item, to account for these subtle differences.
EDIT:
Not sure why this was downvoted, if you don't believe me, you can always check with Amazon:
http://www.amazon.com/gp/help/customer/display.html/ref=hp_468512_calculated?nodeId=468512#calculated
I think they know what they're talking about.
FINAL UPDATE:
- Nexus is defined as where your business is registered to operate.
- The US Government defines (simply) 2 types of products, tangible (potentially taxable) and intangible goods. In MOST cases (each case is subject to interpretation and the law), tangible goods are taxable, and intangible goods are not.
- If your business has it's offices in California, you have nexus in California.
- If your business does not have offices or any other nexus in Nevada, you do not have nexus in Nevada.
Now, if someone goes to your site, and buys something from your business (in California) and the shipping address for the product is Nevada, then taxes do not have to be collected. If they have a billing address in California, and a shipping address in Nevada, and the goods are shipping to Nevada, you do not have to declare tax.
If you have a mixture of tangible (computer, mouse, keyboard) and intangible assets (warranty) in a cart, and the shipping address is in California, you charge tax on the tangible assets, but NOT on the intangible assets.
Yes, you can charge tax on the whole order. Yes for most businesses that's "Good enough", but I'm not trying to provide the "good enough" solution, I'm simply telling you how very large businesses run and operate. As I've mentioned, I've done several tax integrations using software called Sabrix (Google if you've not heard of it), and have done those integrations for companies like the BBC and Corbis (owned and operated by Bill Gates).
Take it or leave it, but the correct way to charge taxes, especially given the complex tax laws of the US and internationally, is to charge per item. If you just need the "good enough" approach, feel free to calculate it by total.
Some additional reading:
http://en.wikipedia.org/wiki/Taxation_of_Digital_Goods
Another possible federal limitation on Internet taxation is the United States Supreme Court case, Quill Corp. v. North Dakota, 504 U.S. 298 (1992),[6] which held that under the dormant commerce clause, goods purchased through mail order cannot be subject to a state’s sales tax unless the vendor has a substantial nexus with the state levying the tax.
In 1997, the federal government decided to limit taxation of Internet activity for a period of time. The Internet Tax Freedom Act (ITFA) prohibits taxes on Internet access, which is defined as a service that allows users access to content, information, email or other services offered over the Internet and may include access to proprietary content, information, and other services as part of a package offered to customers. The Act has exceptions for taxes levied before the statute was written and for sales taxes on online purchases of physical goods.