Journalism Finance - v2.0.6
    Preparing search index...

    Function getSalesTax

    • Calculates the Canadian sales tax for a given amount, province, and year.

      Parameters

      • amount: number

        The base amount before tax.

      • province:
            | "Newfoundland and Labrador"
            | "Prince Edward Island"
            | "Nova Scotia"
            | "New Brunswick"
            | "Quebec"
            | "Ontario"
            | "Manitoba"
            | "Saskatchewan"
            | "Alberta"
            | "British Columbia"
            | "Yukon"
            | "Northwest Territories"
            | "Nunavut"

        The province or territory.

      • year: 2025

        The tax year.

      Returns { gst: number; hst: number; pst: number; totalAmount: number; totalTax: number }

      An object containing the breakdown of taxes and the total amount.

      const salesTax = getSalesTax(100, "Quebec", 2025);
      console.log(salesTax);
      // { gst: 5, pst: 9.975, hst: 0, totalTax: 14.975, totalAmount: 114.975 }

      Reference: https://www.retailcouncil.org/resources/quick-facts/sales-tax-rates-by-province/