Skip to content

Sample work · Calculators & Tools

Quote Calculator: Volume Discount, Voucher, Shipping, and VAT, down to the exact cent

A browser-based calculator that computes a quote step by step. Every displayed amount was automatically checked against an independent recalculation, including half cents and volume tiers.

Sample work (demo), not a client job. Built as a trial task with invented example data; the check figures below come from the automatic test run and are not polished.

What was built

  • Single page, pure HTML and JavaScript, without any libraries and without a server
  • Discount tiers, voucher, shipping cost threshold, and VAT with commercial rounding
  • Invalid inputs are intercepted and explained instead of showing an incorrect total

Screenshot from the test run: Quote Calculator: Volume Discount, Voucher, Shipping, and VAT, down to the exact cent

View live demo

How it was checked

Automatic test run on 2026-10-31, taken from the log (test data invented, figures measured):

  • 41 quotes calculated via the interface, 287 displayed amounts compared against Python decimal (ROUND_HALF_UP), incl. half cents, volume thresholds 10/50, shipping threshold 100 EUR, VAT 19/7 % with proportional voucher
  • 6/6 invalid inputs intercepted
  • 0 deviations

Limits

What this sample does not cover, so nobody expects more:

  • Calculation rules (volume discount, voucher, shipping threshold, VAT 19/7 %) are an example - actual customer rules must be defined in writing beforehand (esp. rounding per line item or per total)
  • No saving/no sending of the quote, no PDF output (see sample pdf_word for that)
  • Only EUR and German number formatting; currency conversion / foreign VAT (OSS, reverse charge) not covered
  • Tested in headless Chromium; visual appearance not automatically evaluated

Something like this for your business?

Describe briefly what you need. You get a fixed price before I start; nothing happens without your yes.

To the workshop