@pathmaker-digital/pmd-utilities - v2.2.6
    Preparing search index...

    Function calculateTotalWithTax

    • Calculates the total amount after applying tax.

      Parameters

      • subtotal: number

        The original amount before tax.

      • taxRate: number

        The tax rate as a percentage.

      Returns number

      The total amount including tax, rounded to 2 decimal places.

      const total = calculateTotalWithTax(100, 8.25);
      console.log(total); // Output: 108.25