Prompt

How do I calculate tax for subscriptions, one-time purchases, refunds, and invoices?

Finance / Tax Software1 observationLast seen Nov 3, 2026

Latest observation

Nov 3, 2026OpenAI APIWeb search: off

Here’s a practical way to calculate tax for each case. I’ll keep it general, since exact rules depend on your country/state and whether you’re charging sales tax, VAT, GST, or similar.

1) Subscriptions

For subscriptions, tax is usually calculated on each recurring charge.

Formula

Tax = Subscription price × tax rate

Example

  • Monthly subscription: $20
  • Tax rate: 10%

Tax = 20 × 0.10 = $2
Total charged = $22

Important notes

  • Tax may be applied:
    • on every billing cycle
    • based on the customer’s location
    • based on the product type
  • If the tax rate changes, future subscription invoices may use the new rate.

2) One-time purchases

Tax is calculated once at the time of sale.

Formula

Tax = Item price × tax rate

Example

  • Product price: $100
  • Tax rate: 8%

Tax = 100 × 0.08 = $8
Total charged = $108

If multiple items

Calculate tax per item or on the subtotal, depending on local rules and your tax system.

Tax = (sum of taxable items) × tax rate


3) Refunds

Refund tax by reversing the original tax amount for the refunded portion.

Full refund

If the customer gets the full amount back:

  • Refund amount: $108
  • Original tax: $8
  • Tax refund: $8

Partial refund

If only part of the purchase is refunded:

Refund tax = Original tax × (Refunded amount / Original amount)

Example

  • Original purchase: $100
  • Tax: $8
  • Total: $108
  • Partial refund: $50 of the $100 item price

Refund tax = 8 × (50 / 100) = $4
So refund:

  • Item: $50
  • Tax: $4
  • Total refund: $54

Important notes

  • Refund tax should usually match the tax originally collected for that portion.
  • Some systems require separate credit notes or refund invoices.

4) Invoices

An invoice usually shows:

  • subtotal
  • tax
  • total due

Formula

Subtotal = sum of line items
Tax = taxable subtotal × tax rate
Total = subtotal + tax

Example

  • Service A: $70
  • Service B: $30
  • Subtotal: $100
  • Tax rate: 5%

Tax = 100 × 0.05 = $5
Invoice total = $105

If invoice has taxable and non-taxable items

Only apply tax to taxable items.

Tax = sum of taxable items × tax rate


General calculation pattern

For most situations:

  1. Determine the taxable amount
  2. Apply the correct tax rate
  3. Round according to local rules
  4. Add tax to get the total

Core formula

Tax = Taxable amount × Tax rate
Total = Taxable amount + Tax


Things to watch out for

  • Tax-inclusive pricing: tax is already included in the listed price, so you must extract it.
  • Multiple tax rates: some items may have different rates.
  • Jurisdiction rules: tax can depend on customer location, seller location, and product type.
  • Rounding: tax may be rounded per line item or at the invoice total level.
  • Exempt items/customers: some sales may not be taxable.

If you want a simple implementation rule

Use this:

  • Subscriptions: calculate tax on each recurring invoice
  • One-time purchases: calculate tax once on the purchase
  • Refunds: reverse tax proportionally to the refund
  • Invoices: tax the taxable subtotal and add it to the total

If you want, I can also give you:

  1. a worked example table,
  2. formula code in Python/JavaScript, or
  3. guidance for tax-inclusive vs tax-exclusive pricing.

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.