• Resolved euzebiobatista

    (@euzebiobatista)


    I have a question about this calculation. I’m testing a plugin, and I wanted to understand how this calculation works.

    Is it like this: ((subtotal + shipping/billing) + fees) + taxes)?

    Because I noticed there seems to be a hierarchy between the fees and the taxes — where the fees are calculated based on the subtotal plus shipping/billing, and then the taxes are applied afterward.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi there!

    Thank you for your question!

    In WooCommerce, the order of calculations generally works as follows:

    1. Subtotal: This is the total of all items in the cart before any additional charges.
    2. Shipping fees: Shipping costs are added to the subtotal.
    3. Additional fees: If a plugin or custom code adds extra fees, these are applied on top of the subtotal + shipping.
    4. Taxes: Taxes are typically calculated last and are applied to the subtotal, shipping, and any additional fees (depending on your tax settings).

    So, the calculation hierarchy is:
    Total = (Subtotal + Shipping + Fees) + Taxes

    However, this can vary based on your WooCommerce tax settings.
    For example:

    • Whether shipping is taxable
    • Whether a fee is marked as taxable
    • Whether product prices are entered inclusive or exclusive of tax

    You can review these settings under:
    WooCommerce → Settings → Tax

    Let me know if you have more details or specific scenarios you’d like to discuss!

    Thread Starter euzebiobatista

    (@euzebiobatista)

    So, if I set a tax in the shipping method, does the calculation work like this?
    (Subtotal + (Shipping + Tax) + Fees) + Taxes — is that right?

    But in general, is the total value received dynamically?

    Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi there!

    If shipping is taxable in WooCommerce, the tax is not directly added into the shipping cost itself. Instead, WooCommerce calculates the total as:

    Total = (Subtotal + Shipping + Fees) + Taxes

    How it works:

    • Taxes are calculated separately, based on your store’s tax settings, and include any applicable tax on shipping if configured.
    • So it’s not: (Shipping+Tax) but rather: Shipping + Tax on shipping (if shipping is taxable)

    Example (simplified):

    Subtotal = $100
    Shipping = $10
    Fees = $5
    Tax (e.g. 10% on subtotal + shipping + fees) = $11.50
    Total = $126.50

    So Correct model:
    (Subtotal + Shipping + Fees) + Taxes

    But in general, is the total value received dynamically?


    Yes, WooCommerce’s cart and checkout pages always calculate totals dynamically. This means any update to product quantity, fees, shipping method, or tax rates will automatically update the final total and breakdown at checkout or in the order summary.

    For more details you can use this guide.
    https://woocommerce.com/document/setting-up-taxes-in-woocommerce/

    I hope this helps.

    Thread Starter euzebiobatista

    (@euzebiobatista)

    I got it.

    Thank you so much for your help.

    Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi there!
    You’re very welcome! I’m glad I could help.

    If you’re happy with the support you received today, would you consider leaving us a quick review? It really helps us out: https://wordpress.org/support/plugin/woocommerce/reviews/#new-post


    Plugin Support thelmachido a11n

    (@thelmachido)

    Hi @euzebiobatista

    It’s been a while since we heard back from you for this reason we are closing this thread. 

    If WooCommerce has been useful for your store and you appreciate the support you’ve received, we’d truly appreciate it if you could leave us a quick review here: 

     https://wordpress.org/support/plugin/woocommerce/reviews/#new-post

    Feel free to open a new forum topic if you run into any other problem.

Viewing 6 replies - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.