Tax and discount ordering
When preparing invoices, discounts are standardly applied to the subtotal before sales tax is calculated. This is because tax is legally owed on the actual transactional price paid by the customer, not the pre-discount list price.
This estimator follows standard invoicing conventions: Subtotal -> Subtract Discount -> Apply Tax Rate on Taxable Amount -> Add Tax to get Invoice Total.