Link to home
Start Free TrialLog in
Avatar of nirisan
nirisan

asked on

Calculate US sales tax by zip code using SQL2005 data

Hi,

I have a sql database table with information below to calculate US sales tax using zip code. Any ideas how to proceed. How is the calculation done for US sales tax? This information is loaded into a table. I was thinking of writing a stored procedure giving the zip as the input parameter. But what is the basis of calculating the tax?

12018      NY      RENSSELAER      DUNHAM HOLLOW      0.040000      0.040000      0.040000      0.040000      0.000000      0.000000      0.000000      0.000000      0.000000      0.000000      0.000000      0.000000      0.000000      0.000000      0.000000      0.000000      0.000000      0.000000      0.080000      0.080000      RE 3881      n/a      n/a      n/a      n/a      n/a      n/a      n/a      n/a      n/a      n/a      n/a      n/a      n/a      Y      Y
Avatar of chapmandew
chapmandew
Flag of United States of America image

US Sales tax is dependent upon the state of purchase and is typically rounded up to the nearest dollar....do you have this information as well?
Avatar of nirisan
nirisan

ASKER

Yes, I have the adress of the buyer with State and zip code.
For the state, do you have the % of sales tax per dollar?  Can you post your table structure?
Avatar of nirisan

ASKER

Thats the problem i do not know the percentage of sales tax for the amount. Table  design is given below.
ZIP_CODE      nvarchar(50)
STATE_ABBREV      nvarchar(50)
COUNTY_NAME      nvarchar(50)
CITY_NAME      nvarchar(50)
STATE_SALES_TAX      nvarchar(50)
STATE_USE_TAX      nvarchar(50)
COUNTY_SALES_TAX      nvarchar(50)
COUNTY_USE_TAX      nvarchar(50)
CITY_SALES_TAX      nvarchar(50)
CITY_USE_TAX      nvarchar(50)
MTA_SALES_TAX      nvarchar(50)
MTA_USE_TAX      nvarchar(50)
SPD_SALES_TAX      nvarchar(50)
SPD_USE_TAX      nvarchar(50)
OTHER1_SALES_TAX      nvarchar(50)
OTHER1_USE_TAX      nvarchar(50)
OTHER2_SALES_TAX      nvarchar(50)
OTHER2_USE_TAX      nvarchar(50)
OTHER3_SALES_TAX      nvarchar(50)
OTHER3_USE_TAX      nvarchar(50)
OTHER4_SALES_TAX      nvarchar(50)
OTHER4_USE_TAX      nvarchar(50)
TOTAL_SALES_TAX      nvarchar(50)
TOTAL_USE_TAX      nvarchar(50)
COUNTY_NUMBER      nvarchar(50)
CITY_NUMBER      nvarchar(50)
MTA_NAME      nvarchar(50)
MTA_NUMBER      nvarchar(50)
SPD_NAME      nvarchar(50)
SPD_NUMBER      nvarchar(50)
OTHER1_NAME      nvarchar(50)
OTHER1_NUMBER      nvarchar(50)
OTHER2_NAME      nvarchar(50)
OTHER2_NUMBER      nvarchar(50)
OTHER3_NAME      nvarchar(50)
OTHER3_NUMBER      nvarchar(50)
OTHER4_NAME      nvarchar(50)
OTHER4_NUMBER      nvarchar(50)
TAX_SHIPPING_ALONE      nvarchar(50)
TAX_SHIPPING_AND_HANDLING_TOGETHER      nvarchar(50)
      
Sales tax would NEVER be rounded to the dollar - it would be rounded to the nearest cent.

You also need to know which ZIP Codes you actually collect sales-tax in.  

If your company does not have a presence in an area - you wouldn't collect tax at all.   For instance, my company doesn't have any entity located in the state of Washington, so we don't have to charge sales-tax.

Sales tax can be a nightmare to collect info and to report.  In some states, the sales-tax rate is set by the state, for the entire state.  Some though allow cities, counties or parishes add an additional sales-tax.  These local sales taxes are usually small compared to the state, but you must be able to track the tax you collect in each area so you can report/file the tax properly.
My mistake....so, if I paid $0.88 for something, would I not get charged the $0.06 sales tax for the dollar (from indiana).
.88 * .06 = .0528  .... you'd probably be charge .05 sales-tax
SOLUTION
Avatar of chapmandew
chapmandew
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Back to the original question - if I now understand it right, you want to know the rates to charge?

You'd probably have to get them from each state.  Whoever is in charge of filing and paying your sales-tax to each jurisdiction (FInance or Accounting department maybe?) will be able to get the rates, broken down in some way.  Unfortunately it probably won't be by zip code, but rather by state/county, maybe by city and sometimes by parish.  You'll need to get a list of all the Zip Codes (you can find/buy a list online) - use that list to populate your table with all of the zip codes for the US - then using the data you get from each state, you'll have to fill in the blanks.  Some states will be easy as they will be a flat-rate per state.  Unless you can find a list you can subscribe to, or buy online - you can expect to spend a decent amount of time populating your table - and then remember you'll have to be notified whenever something changes so you can make the appropriate changes to your table
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial