Converter tool

Add or Remove VAT in CSV

Turn net prices into gross or gross into net for a whole CSV column, with your rate, rounding and column names. Free, and it runs in your browser.

Every original column is kept and three columns are added at the end. Empty, negative and non-numeric prices get blank result cells and are listed by row number. The file is read and calculated by this browser tab.

Preview

Output Preview

Load a CSV, pick the price column and rate, and press Calculate VAT.

Add or Remove VAT in CSV

Operator: Abdulla Al Fahad. How tools are built and checked

A supplier sends a price list without VAT and your shop platform wants prices that include it. Or the opposite: a till export gives gross takings per item and the bookkeeping needs the net amount and the tax separately. The arithmetic is one line per row, but doing it across a few thousand rows in a spreadsheet means writing a formula, copying it down, rounding it, and then discovering that some cells held text and quietly produced zeros.

This tool takes a CSV, the column that holds the price, a rate you type and a rounding rule, and returns the same rows with three columns added: net, VAT and gross. Prices it cannot read are left blank and listed with their row number, so nothing turns into a silent zero, and the totals of all three columns are shown on screen before you download.

Key features

  • Add VAT to net prices or remove it from gross prices
  • Any rate from 0 to 100 percent, typed as 20, 7.7 or 7,7
  • Three rounding rules, including one that keeps net plus VAT equal to gross on every row
  • Decimal comma option for prices written as 1.299,50
  • Editable names for the three new columns, checked against the existing headers so nothing is overwritten
  • Empty, negative and unreadable prices left blank and listed by data row
  • Totals for net, VAT and gross over the rows that were calculated
  • Original rows and columns kept unchanged

Decimal commas, currency signs and rounding

The input is a comma-separated text file with a header row. Pick the price column from its header names; the tool pre-selects the column with the most readable prices. A price may have a currency sign ($, €, £ or ¥) before or after it and spaces around it. A leading minus or accounting brackets such as (12.00) mark it as negative.

By default a dot is the decimal mark and commas may group thousands, but only in groups of three digits: 1,299.00 is read as 1299, while 19,99 is refused with a hint to switch on the decimal comma option rather than being read as 1999. With decimal comma on, the roles swap: 1.299,50 is 1299.5 and 19.99 is refused with the opposite hint. A price containing both marks in the wrong order, such as 1.234,50 with the option off, is reported as not a number.

The output keeps every original column in its original order and appends the three new columns at the end, named net, vat and gross unless you change them. Each result is written with two decimals under the first two rounding rules, or with as many digits as needed under no rounding. With decimal comma on, the new columns use a comma as well, and those cells are quoted in the CSV so the comma does not split them.

How it works

Adding VAT multiplies the net price by the rate: at 20%, a net price of 100 gives VAT of 20 and a gross price of 120. Removing VAT divides the gross price by one plus the rate: 120 divided by 1.2 is 100, and the VAT is the 20 in between. The common mistake of taking 20% off the gross price gives 96, which is wrong; the tool always divides.

The three rounding rules differ in what gets rounded and when. Two decimal places computes net, VAT and gross at full precision and rounds each one to the nearest cent on its own, with halves going up. Whole cents rounds the price to cents first, then rounds the VAT half-up to whole cents, and derives the third figure by adding or subtracting, so net plus VAT always equals gross exactly on each row. None keeps full precision, so 19.99 plus 20% shows as 23.988.

Half-up rounding here works on the decimal value you would write down, not on the binary floating-point number a computer stores. A net price of 1.005 rounds to 1.01, where a plain floating-point rounding would give 1.00.

Totals add up the figures as they appear in each row. Under the two rounding rules they are summed in whole cents, so the total VAT is the sum of the rounded VAT cells, which is what an invoice line list shows, rather than the VAT on the total.

Common use cases

  • An online shop owner turns a supplier's net wholesale list into gross shelf prices at 20% before importing it into the shop platform.
  • A bookkeeper splits a month of gross till sales into net and VAT columns for the quarterly return.
  • A café in a country with a reduced rate removes 10% VAT from menu prices to compare margins against net ingredient costs.
  • A freelancer working from a German-format export with prices like 1.250,00 uses the decimal comma option to get net and tax for each invoice line.

How to use this tool

  1. Choose your CSV or drop it on the upload area, or press Use sample data for a six-item price list.
  2. Check the price column the tool picked and change it if needed.
  3. Choose whether the prices are net (add VAT) or gross (remove VAT).
  4. Type the rate as a percentage, without the percent sign if you prefer.
  5. Pick a rounding rule, and switch on decimal comma if your prices are written like 12,50.
  6. Rename the three new columns if your platform expects specific headers, then press Calculate VAT.
  7. Check the totals and the list of blank prices, then download the CSV.

Example

prices.csv, net prices, VAT at 20%, rounding to 2 decimal places

sku,product,price
TEA-01,Loose leaf tea 250g,6.40
MUG-02,Stoneware mug,12.00
KET-03,Kettle 1.7L,34.95
INF-04,Tea infuser,3.99
GFT-05,Gift box,19.99
SMP-06,Sample pack,free

prices-with-vat.csv (totals: net 77.33, VAT 15.47, gross 92.80; data row 6 "free" reported as not a number)

sku,product,price,net,vat,gross
TEA-01,Loose leaf tea 250g,6.40,6.40,1.28,7.68
MUG-02,Stoneware mug,12.00,12.00,2.40,14.40
KET-03,Kettle 1.7L,34.95,34.95,6.99,41.94
INF-04,Tea infuser,3.99,3.99,0.80,4.79
GFT-05,Gift box,19.99,19.99,4.00,23.99
SMP-06,Sample pack,free,,,

Tips for best results

  • Rename the columns to match your import template, for example price_excl_vat, vat_amount and price_incl_vat, so the headers are closer to what the import expects. The download keeps every original column and adds the three new ones at the end, so check the column mapping in your import screen before you confirm it.
  • If the price column is not pre-selected correctly, it usually means most of its cells use the other decimal mark; try the decimal comma option.
  • A rate of 0 is allowed and produces a VAT column of zeros, which is useful when a template expects all three columns for zero-rated items.

Common pitfalls

Rounding each figure on its own can break the line total. Removing 20% VAT from a gross price of 9.99 gives a net of 8.325 and VAT of 1.665 before rounding. Rounded separately they become 8.33 and 1.67, which add up to 10.00, a cent more than the price. Under whole cents, the VAT is rounded to 1.67 and the net is derived as 9.99 minus 1.67, which is 8.32. Over five gross prices of 9.99, 4.99, 0.05, 10.01 and 2.50, the per-figure rule gives net totals of 22.95 against 22.94 under whole cents.

One rate per run. Mixed-rate price lists, reduced rates on some items and zero-rated lines all need to be split and run separately. The tool does not read a rate from a column.

Negative prices are not calculated. Credit notes and refunds written as -12.00 or (12.00) are listed and left blank, because whether VAT should be negative too depends on how your system books refunds. Process refunds as positive amounts and negate the results yourself if needed.

Rounding is half-up only. Some systems round halves to the nearest even cent or always round VAT down; if yours does, the results can differ by a cent on rows where the unrounded VAT ends in exactly half a cent.

Totals are the sum of rounded row figures. The VAT on a whole invoice is sometimes calculated once on the net total instead, which can differ by a few cents on long lists; the tool does not offer that method.

Common errors and how to fix them

Data row 14 has 6 cells but the header has 5.
A price such as 1,299.00 was written without quotes, so its comma split it into two cells. Re-export the file with quoted fields, or fix that row in a text editor by putting the price in double quotes.
"19,99": looks like a decimal comma; turn on the decimal comma option.
The price uses a comma as the decimal mark. Switch on Decimal comma and calculate again. If the file mixes both styles, the rows in the other style will then be reported instead, and need fixing at the source.
The file already has a column called "vat".
One of the new column names matches an existing header. Rename the output column, for example to vat_20, so the original column is not shadowed in the download.
Type the VAT rate as a percentage from 0 to 100.
The rate box accepts a number such as 20, 5 or 7.7. Enter 20 for twenty percent, not 0.2, and leave out words such as VAT.

Best practices

  • Use whole cents when the three columns must reconcile line by line, as on invoices or ledger imports, since that rule guarantees net plus VAT equals gross on every calculated row.
  • Run the tool on a copy of the list that contains a single rate. Where products carry different rates, split the file by rate first and process each part with its own rate.
  • Keep the original price column. The output already contains it, which lets you check any row by hand later.
  • After removing VAT from shelf prices, check the net prices against the supplier list, not against a recalculation of the gross, to catch prices that were rounded to a charm price such as 9.99.

Which rounding rule to choose

Pick two decimal places when you only need a readable price list, for example gross shelf prices for a website, where each figure is looked at on its own. Pick whole cents when the three columns must reconcile, as on invoices, VAT returns or ledger imports. Pick none when the output feeds another calculation and you want to round only at the end.

For adding VAT to prices that already have two decimals, the first two rules usually give the same figures, as they do for all five items in the example above. They part ways when removing VAT, and when net prices carry more than two decimals: a net of 10.125 at 20% gives 10.13, 2.03 and 12.15 per figure, but 10.13, 2.03 and 12.16 under whole cents, because the net is rounded first and the gross is built from the rounded parts.

Frequently asked questions

How are the row numbers in the list of blank prices counted?

Data row 1 is the first row after the header. Completely blank lines are skipped and do not get a number, and a quoted cell that runs over several lines still belongs to one row, so a row number can be lower than the line number a text editor shows.

Does this work for sales tax or GST?

Yes, for any single-rate tax added on top of a net price, such as GST or a US state sales tax. Type the combined rate if several taxes are charged at once. Taxes that compound, where one tax is charged on top of another, need two runs: add the first, then use its gross column as the price for the second.

Why is my total VAT different from the VAT on the total net?

The total adds up the rounded VAT of each row. Rounding row by row and rounding once at the end can differ by a cent or more over many rows. Use no rounding if you want the totals at full precision.

What happens to rows with fewer cells than the header?

They are padded with empty cells so the new columns line up. A row with more cells than the header stops the calculation, because its price may be in the wrong column.