FeeKit
Documentation & Formulas

Calculation Methodology & Data Sources

Last updated: January 2026

1. Architectural Foundation: Client-Side Precision

FeeKit is engineered around pure TypeScript computational models executed entirely client-side in the user's browser. We do not transmit transaction values, invoice sums, or client revenue numbers to external APIs.

Every formula in our codebase is designed with exact floating-point rounding controls (`Math.round((value + Number.EPSILON) * 100) / 100`) to eliminate IEEE-754 floating-point inaccuracies that frequently plague online calculators.

2. Payment Processing Fee Methodology

Payment gateway processing fees combine a percentage-based variable interchange cut with a fixed per-transaction fee. FeeKit models both domestic and cross-border commercial rates across Stripe, PayPal, Square, Venmo, Gumroad, Lemon Squeezy, and Authorize.Net:

Forward Deductions (Gross to Net):
Fee = (Gross Amount × Percentage Rate) + Fixed Fee
Net Payout = Gross Amount - Fee

Example: A $1,000 credit card transaction on Stripe US (2.9% + $0.30) incurs a fee of ($1,000 × 0.029) + $0.30 = $29.30, yielding a net payout of $970.70.

Bidirectional Invoicing Reverse Payout (Net to Gross):
Invoice Gross Amount = (Target Net + Fixed Fee) / (1 - Percentage Rate)

Why this matters: If you need exactly $1,000 in your bank account, adding 2.9% + $0.30 ($29.30) to make the invoice $1,029.30 leaves you short, because the processor deducts 2.9% from the new higher total ($1,029.30 × 0.029 + $0.30 = $30.15). Our reverse formula solves for the exact gross amount ($1,030.18) so your net take-home is exactly $1,000.00.

3. US State Sales Tax & UK VAT Methodology

Tax computation models differ fundamentally between the destination-based sales tax framework of the United States and the value-added tax (VAT) regime of the UK and Europe:

US 50-State Sales Tax Models:

In the US, 45 states plus DC levy statewide sales taxes, while 5 states (Alaska, Delaware, Montana, New Hampshire, Oregon) levy 0% statewide. However, 38 states permit local city, county, transit, or special taxing districts to impose local piggyback surtaxes.

Total Tax Rate = State Base Statutory Rate + Local Discretionary Surtax
Sales Tax Owed = Taxable Sale Amount × Total Tax Rate

Data Source: State Department of Revenue rate publications (e.g., California CDTFA, Texas Comptroller Rule 3.334, New York DTF Publication 718).

UK HMRC VAT (Making Tax Digital):

Under UK HMRC guidelines, businesses whose taxable turnover exceeds the statutory registration threshold (£90,000) must collect VAT. Standard items are taxed at 20%, reduced items (e.g., domestic energy) at 5%, and zero-rated items (e.g., books, children's clothing) at 0%.

Adding VAT (Exclusive): Gross = Net × (1 + VAT Rate)
Extracting VAT (Inclusive): Net = Gross / (1 + VAT Rate) ; VAT Amount = Gross - Net

Data Source: UK HMRC Notice 700 (The VAT Guide) and published Making Tax Digital schedules.

4. Freelancer 1099 Hourly Rate & Tax Formula

Freelancers who bill as independent 1099 contractors must absorb self-employment taxes, health insurance, software tools, unpaid sick days, and non-billable client acquisition hours. Our Freelance Rate Calculator derives minimum hourly and day rates through the following verified model:

Step 1: Statutory SECA Tax Buffer

Under the Self-Employment Contributions Act (SECA), independent contractors pay 15.3% (12.4% Social Security + 2.9% Medicare) on 92.35% of net business profit:

Net Taxable SE = Net Earnings × 0.9235
Self-Employment Tax = Net Taxable SE × 0.153
Step 2: Annual Economic Gross-Up
Gross Target Revenue = Target Take-Home + Taxes (Income + SECA) + Business Overhead + Health/PTO Reserve
Step 3: Realistic Billable Efficiency

Full-time employees work 2,080 hours per year, but independent consultants typically spend 40%–50% of time on marketing, proposal drafting, invoicing, and professional development:

Billable Hours = (52 Weeks - Vacation Weeks) × Weekly Hours × Billable Utilization (typically 60%–70%)
Minimum Hourly Rate = Gross Target Revenue / Billable Hours
Standard Day Rate = Minimum Hourly Rate × 8 Hours

5. Corporate Finance & Margin Equations

Markup vs Margin:
Gross Margin % = (Revenue - COGS) / Revenue × 100
Markup % = (Revenue - COGS) / COGS × 100

A product costing $50 sold for $100 has a 100% markup, but only a 50% profit margin.

Break-Even & E-Commerce ROAS:
Break-Even Units = Fixed Costs / (Unit Price - Variable Unit Cost)
Break-Even ROAS = 1 / Gross Margin %

If gross margin is 40% (0.40), the minimum advertising return on ad spend (ROAS) required to avoid a loss is 1 / 0.40 = 2.50x.

6. Model Limitations & Operational Disclaimers

Important Limitations:
  • Local District Surtaxes: In US states with local discretionary sales tax options, exact municipal rates depend on street-level destination addresses. FeeKit provides statutory maximum caps and county benchmarks, but users must consult local address locator systems for specific tax remittances.
  • Tiered Gateway Interchange: Calculations reflect standard published commercial tiers. Custom enterprise interchange-plus volume discounts negotiated privately with processors are not accounted for automatically.
  • Tax Advice: All outputs are operational estimates for budgeting and invoicing. They do not constitute certified tax filings or professional accounting opinions.

7. Frequently Asked Calculation Questions

Why can payment processing fee calculations vary by 1 cent between platforms?

Small 1-cent variances occur across software platforms due to intermediate rounding differences in IEEE 754 floating-point arithmetic. FeeKit uses standard half-up rounding with an epsilon compensation formula (Math.round((amount + Number.EPSILON) * 100) / 100) to match the exact settlement figures produced by banking and card network processors.

How often are tax rates and payment processor fees audited on FeeKit?

FeeKit runs automated test suites (such as npm run validate:rates) and continuous monitoring of official US state Departments of Revenue, UK HMRC bulletins, and payment processor developer schedules to keep published reference data updated.

Are calculations processed on FeeKit servers or in the client browser?

All computations run 100% client-side in the user's web browser. No proprietary financial figures, turnover, invoice items, or personal numbers are ever sent across a network or stored in external databases.

8. Data Updates & Reporting Inaccuracies

Our datasets are audited weekly against regulatory and corporate publications. If you detect an update or formula discrepancy, please notify our engineering team at hello@snab.co.in.