DEV Community

Cover image for ShowDev: I built ClearMargin, a zero-dependency TypeScript tax & reverse-pricing toolkit
Kishin Sagume
Kishin Sagume

Posted on

ShowDev: I built ClearMargin, a zero-dependency TypeScript tax & reverse-pricing toolkit

After publishing my zero-dependency TypeScript tax & reverse-pricing package (clearmargin-tax-engine), I just launched the full web toolkit—ClearMargin—on Product Hunt today: https://producthunt.com/products/clearmargin

Why I built it this way

Most freelance tax and marketplace fee calculators online lock results behind an email capture wall, send your income numbers to a backend, or rely on stale brackets and linear fee approximations.

ClearMargin takes a static, transparent approach:

  • 100% client-side & static (Astro 5): All 139 pages build into static HTML. Every calculation runs locally in your browser—no accounts, no server-side storage of financial inputs.
  • Auditable open-source math (MIT): The 2026 IRS Schedule SE, 51-jurisdiction state tax rules, split 2026 IRS mileage rates ($0.725/mi Jan–Jun & $0.76/mi Jul–Dec), and 23-platform reverse-pricing solvers live in JulyWhisky0/clearmargin-tax-engine (npm i clearmargin-tax-engine).

Three 2026 numbers that surprised even me while testing

  1. W-2 vs 1099 Break-Even: Matching a $110,000 California W-2 package ($52.88/hr base, $7,200 health, $4,400 401k match, 20 PTO days) requires billing $76.45/hr (1.45x) as a 1099 contractor.
  2. State Domicile & QBI Conformity: On $120,000 gross 1099 revenue ($10,000 expenses), Texas nets $84,587 vs California $79,068—a $5,519/yr ($27,595 over 5 years) gap.
  3. Reverse Pricing Is Not (1 + fee): To net $1,000 on Fiverr’s 20% commission, $1,000 × 1.20 = $1,200 leaves only $960; you must quote $1,250. For discontinuous cliffs like Poshmark ($2.95 flat under $15 vs 20% at $15+) or capped rails like Stripe ACH ($5 max), we combine binary search with boundary cliff probing.

Architecture highlights

  • Shared Build-Time + Runtime Engine: The exact same TypeScript module generates static SSR benchmark tables during astro build and powers instant client recalculation, CSV exports, and shareable URL hashes/params.
  • Automated Math & SEO Verification: CI runs verify-math.mjs across all 51 states, 23 platforms, 30 state comparisons, and 7 gig verticals alongside verify-seo.mjs checking title/meta lengths, canonicals, JSON-LD, and sitemap <lastmod>.

Links:

If you're a freelance dev, indie SaaS builder, or working with Astro static sites, I’d love your feedback!

Top comments (0)