Scott McFarlane has always found the idea of accounting and sales tax boring, but that didn't stop him from starting a business to "make sales tax less taxing" for other businesses.

That business is Avalara.

With thousands of sales-tax rules, more than 10,000 tax jurisdictions in the U.S. and the rise of the Internet, figuring out how to tax something in the moment a customer hits the "buy now" button, is complicated. That is, McFarlane says, unless that company has an automated sales-tax calculator included in its software --like AvaTax.

"Orange juice is taxed 300 different ways in the United States," said McFarlane, Avalara's chief executive. "So you have to know how to calculate the tax on it, and not just one time but in every local jurisdiction around the country."

Avalara could get even more business if Congress passes the Marketplace Fairness Act, which could require online retailers to collect state sales taxes wherever their products are shipped, not just where the company is located.

What started as a 12-person company on Bainbridge Island, Wash., in 2004 has grown into a multimillion-dollar company with more than 500 employees in eight offices around the world.

In the past year, Avalara has added almost 200 employees. And from 2008 to 2012, the company's revenue rose 411 percent.

The idea for automating sales-tax calculation came from McFarlane's business partner Rory Rawlings. He, McFarlane and Jared Vogt all live on Bainbridge Island in Washington's Puget Sound, and the three joined forces in 2003.

Vogt and McFarlane had worked together previously, founding Seattle-based MetaInfo, a software-development firm, before selling it to Check Point Software Technologies in 1998. They teamed up with Rawlings because they knew he had come up with a great idea they could build into something big, McFarlane said.

AvaTax aggregates more than 100,000 sales-tax rules, 10,000 U.S. tax jurisdictions, 150 million addresses and countless other sales-tax regulations around the world--everything from the tax rate of a pair of high heels in Atlanta to a weeklong retail tax holiday in Texas--and attaches them to a company's sales-management system.

Then, the appropriate tax is calculated and applied automatically to a transaction in less than a second--which McFarlane calls the "magic moment."

Taxware and Vertex, both tax-calculating solutions, were on the market when Avalara was created, but both were limited to larger companies, McFarlane said. Small and midlevel businesses, on the other hand, had to calculate sales tax in accounting systems manually, creating the demand for AvaTax, and the opportunity for the company to grow, he said.

Microsoft Dynamics was one of the first companies Avalara wanted to collaborate with. The business-accounting software has always worked with independent software vendors, like Avalara, that complement its own program.

"We know we can never write all the software that customers need," said Jeff Edwards, director of partner strategy at Microsoft. "Entrepreneurs are critical to what we do."

Avalara's AvaTax has been certified by Microsoft for Microsoft Dynamics, which Avalara can use to promote its products. It is basically a Microsoft seal of approval, Edwards said.

An Enterprise Resource Planning, or ERP, system, like Microsoft Dynamics, is business-management software a company can use to store and manage data from every stage of its business.

Avalara's tax solution is integrated into hundreds of ERP and e-commerce software systems that serve small to medium-size businesses across the country. Those include Intuit (INTU), which operates TurboTax and QuickBooks, and Intacct, which partners with popular e-commerce websites like GrubHub and Kayak.

Avalara sells its tax products to companies through a subscription model based on the number of transactions the customer anticipates, which can range from a couple of hundred dollars to thousands of dollars per year.

In 2012, Avalara was approached by Battery Ventures, which has since invested between $20 million and $30 million in the company.

"When the fifth CFO in one of our board meetings mentioned they were using Avalara, we started calling the company," said Chelsea Stoner, a Battery Ventures partner in the California office. "When you hear of something a couple of times, you realize it is something you should pay attention to."

Stoner paid attention. She said Battery Ventures realized quickly they should invest after discovering Avalara had little competition.