clearmargin-tax-engine 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ This open-source package exposes the deterministic mathematical rules behind:
|
|
|
11
11
|
- **2026 IRS Schedule SE & Federal Income Tax Engine** (92.35% SE taxable earnings factor, 12.4% Social Security up to the $184,500 2026 wage cap, 2.9% + 0.9% Medicare, 50% SE deduction, Section 199A 20% QBI deduction, and progressive Single / MFJ / HOH brackets)
|
|
12
12
|
- **All 50 US States + District of Columbia (51 Jurisdictions)** with progressive brackets, flat rates, no-tax states, state standard deductions/exemptions, and federal-taxable-income conformity logic
|
|
13
13
|
- **Freelance Hourly Rate & W-2 vs 1099 Equivalency Solvers**
|
|
14
|
-
- **Gig Economy & Creator 1099 Engine (7 Verticals)** modeling the **2026 IRS $0.
|
|
14
|
+
- **Gig Economy & Creator 1099 Engine (7 Verticals)** modeling the **2026 IRS split business mileage rates ($0.725/mile Jan–Jun & $0.76/mile Jul–Dec under IRS Announcement 2026-11)**
|
|
15
15
|
- **23 Marketplace, SaaS & Payment Processor Fee Engines + Exact Reverse-Pricing Solvers** (handling discontinuous tiers such as Poshmark’s flat $2.95 cliff below $15 and Stripe ACH’s $5.00 cap)
|
|
16
16
|
|
|
17
17
|
---
|
|
@@ -90,6 +90,8 @@ const uber = calculateGigTax({
|
|
|
90
90
|
platformFeePct: 0,
|
|
91
91
|
supportsMileage: true,
|
|
92
92
|
milesDriven: 28000,
|
|
93
|
+
milesH1: 14000, // Jan 1 – Jun 30, 2026 @ $0.725/mi (IRS Notice 2026-10)
|
|
94
|
+
milesH2: 14000, // Jul 1 – Dec 31, 2026 @ $0.76/mi (IRS Announcement 2026-11)
|
|
93
95
|
otherExpenses: 2400,
|
|
94
96
|
hoursPerWeek: 35,
|
|
95
97
|
stateSlug: 'texas',
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/** IRS Notice 2026-10: Jan 1 – Jun 30, 2026 business standard mileage rate ($0.725/mile) */
|
|
2
|
+
export declare const IRS_2026_MILEAGE_RATE_H1 = 0.725;
|
|
3
|
+
/** IRS Announcement 2026-11: Jul 1 – Dec 31, 2026 mid-year business standard mileage rate ($0.76/mile) */
|
|
4
|
+
export declare const IRS_2026_MILEAGE_RATE_H2 = 0.76;
|
|
5
|
+
/** Equal 50/50 full-year blended reference rate ($0.7425/mile) when annual miles are split evenly across H1 & H2 */
|
|
6
|
+
export declare const IRS_2026_MILEAGE_RATE_BLENDED: number;
|
|
7
|
+
/** Active H2 2026 IRS business standard mileage rate (effective July 1, 2026) */
|
|
8
|
+
export declare const IRS_2026_MILEAGE_RATE = 0.76;
|
|
2
9
|
export interface GigFaq {
|
|
3
10
|
q: string;
|
|
4
11
|
a: string;
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
/** IRS Notice 2026-10: Jan 1 – Jun 30, 2026 business standard mileage rate ($0.725/mile) */
|
|
2
|
+
export const IRS_2026_MILEAGE_RATE_H1 = 0.725;
|
|
3
|
+
/** IRS Announcement 2026-11: Jul 1 – Dec 31, 2026 mid-year business standard mileage rate ($0.76/mile) */
|
|
4
|
+
export const IRS_2026_MILEAGE_RATE_H2 = 0.76;
|
|
5
|
+
/** Equal 50/50 full-year blended reference rate ($0.7425/mile) when annual miles are split evenly across H1 & H2 */
|
|
6
|
+
export const IRS_2026_MILEAGE_RATE_BLENDED = Math.round(((IRS_2026_MILEAGE_RATE_H1 + IRS_2026_MILEAGE_RATE_H2) / 2) * 10000) / 10000;
|
|
7
|
+
/** Active H2 2026 IRS business standard mileage rate (effective July 1, 2026) */
|
|
8
|
+
export const IRS_2026_MILEAGE_RATE = IRS_2026_MILEAGE_RATE_H2;
|
|
2
9
|
export const GIG_PLATFORMS = [
|
|
3
10
|
{
|
|
4
11
|
slug: 'uber',
|
|
5
12
|
name: 'Uber',
|
|
6
13
|
roleLabel: 'Rideshare Driver',
|
|
7
|
-
tagline: 'Calculate 2026 Uber 1099-NEC & 1099-K self-employment taxes, $0.
|
|
14
|
+
tagline: 'Calculate 2026 Uber 1099-NEC & 1099-K self-employment taxes, split 2026 IRS mileage deductions ($0.725/mi Jan–Jun & $0.76/mi Jul–Dec), quarterly payments, and net hourly take-home pay.',
|
|
8
15
|
supportsMileage: true,
|
|
9
16
|
defaultGrossRevenue: 52000,
|
|
10
17
|
defaultMiles: 28000,
|
|
@@ -15,7 +22,7 @@ export const GIG_PLATFORMS = [
|
|
|
15
22
|
taxFormLabel: 'Form 1099-NEC & 1099-K',
|
|
16
23
|
platformFeeNote: 'Uber driver 1099-NEC payouts and bank deposits already reflect net driver pay after Uber booking/service fees, so Platform Cut defaults to 0%. If you input gross rider fares from your Uber Annual Tax Summary, include Uber service fees in Other Schedule C Expenses.',
|
|
17
24
|
commonDeductions: [
|
|
18
|
-
'IRS Standard Mileage ($0.
|
|
25
|
+
'IRS Standard Mileage ($0.725/mi Jan 1–Jun 30 & $0.76/mi Jul 1–Dec 31, 2026) for all online, pickup, and repositioning miles',
|
|
19
26
|
'Business share of smartphone hardware and monthly unlimited wireless plan',
|
|
20
27
|
'Highway tolls, airport queue fees, and business parking paid while driving',
|
|
21
28
|
'Dual-facing dashcam, magnetic phone mount, fast chargers, and passenger water/snacks',
|
|
@@ -23,15 +30,15 @@ export const GIG_PLATFORMS = [
|
|
|
23
30
|
'Rideshare insurance endorsement difference, mileage-tracking app, and tax software',
|
|
24
31
|
],
|
|
25
32
|
tips: [
|
|
33
|
+
'Split your 2026 odometer log at June 30 / July 1: under IRS Announcement 2026-11, miles driven Jan–Jun deduct at $0.725/mi while Jul–Dec miles deduct at $0.76/mi.',
|
|
26
34
|
'Track every deadhead mile from the moment you go online until your final drop-off—app-reported "trip miles" miss up to 35% of deductible driving.',
|
|
27
|
-
'Do not double-count gas, oil changes, tires, or auto insurance on top of the $0.
|
|
28
|
-
'Set aside your estimated quarterly tax out of weekly payouts into a dedicated high-yield savings account before Form 1040-ES deadlines.',
|
|
35
|
+
'Do not double-count gas, oil changes, tires, or auto insurance on top of the 2026 standard mileage rate ($0.725/$0.76/mi); those vehicle costs are already built in.',
|
|
29
36
|
],
|
|
30
37
|
rivals: ['lyft', 'doordash', 'instacart', 'amazon-flex'],
|
|
31
38
|
faqs: [
|
|
32
39
|
{
|
|
33
40
|
q: 'How much should Uber drivers set aside for taxes in 2026?',
|
|
34
|
-
a: 'After claiming the 2026 $0.
|
|
41
|
+
a: 'After claiming the 2026 IRS standard mileage deduction ($0.725/mi Jan–Jun and $0.76/mi Jul–Dec) and wireless/supply write-offs, many full-time Uber drivers owe roughly 10% to 18% of their gross payouts in combined self-employment (15.3%) and federal/state income tax, depending on state rates and filing status.',
|
|
35
42
|
},
|
|
36
43
|
{
|
|
37
44
|
q: 'Why does Uber issue both a 1099-K and a 1099-NEC?',
|
|
@@ -39,11 +46,11 @@ export const GIG_PLATFORMS = [
|
|
|
39
46
|
},
|
|
40
47
|
{
|
|
41
48
|
q: 'Can Uber drivers deduct deadhead miles between rides?',
|
|
42
|
-
a: 'Yes. Once you are online and actively available for trips—driving to pickup locations, returning from drop-offs, or repositioning to busy zones—those business miles qualify for the $0.
|
|
49
|
+
a: 'Yes. Once you are online and actively available for trips—driving to pickup locations, returning from drop-offs, or repositioning to busy zones—those business miles qualify for the 2026 IRS rate ($0.725/mi through June 30 and $0.76/mi starting July 1, 2026).',
|
|
43
50
|
},
|
|
44
51
|
{
|
|
45
|
-
q: 'Should Uber drivers use the $0.
|
|
46
|
-
a: 'Most rideshare drivers save significantly more with the $0.
|
|
52
|
+
q: 'Should Uber drivers use the 2026 standard mileage rate ($0.725/$0.76/mi) or actual car expenses?',
|
|
53
|
+
a: 'Most rideshare drivers save significantly more with the 2026 IRS standard rate ($0.725/mi Jan–Jun, raised mid-year to $0.76/mi Jul–Dec), especially in fuel-efficient hybrids or older vehicles. You must choose standard mileage in the first year you place a vehicle into rideshare service if you want the option to switch later.',
|
|
47
54
|
},
|
|
48
55
|
],
|
|
49
56
|
},
|
|
@@ -51,7 +58,7 @@ export const GIG_PLATFORMS = [
|
|
|
51
58
|
slug: 'doordash',
|
|
52
59
|
name: 'DoorDash',
|
|
53
60
|
roleLabel: 'Delivery Dasher',
|
|
54
|
-
tagline: 'Estimate 2026 DoorDash 1099-NEC taxes, $0.
|
|
61
|
+
tagline: 'Estimate 2026 DoorDash 1099-NEC taxes, split 2026 IRS mileage savings ($0.725/mi Jan–Jun & $0.76/mi Jul–Dec), quarterly IRS installments, and true after-tax hourly earnings.',
|
|
55
62
|
supportsMileage: true,
|
|
56
63
|
defaultGrossRevenue: 36000,
|
|
57
64
|
defaultMiles: 21000,
|
|
@@ -62,7 +69,7 @@ export const GIG_PLATFORMS = [
|
|
|
62
69
|
taxFormLabel: 'Form 1099-NEC',
|
|
63
70
|
platformFeeNote: 'DoorDash Form 1099-NEC reports your net Dasher earnings (base pay, peak pay, challenges, and 100% of customer tips) directly with 0% platform commission withheld.',
|
|
64
71
|
commonDeductions: [
|
|
65
|
-
'IRS Standard Mileage ($0.
|
|
72
|
+
'IRS Standard Mileage ($0.725/mi Jan 1–Jun 30 & $0.76/mi Jul 1–Dec 31, 2026) from restaurant dispatch to drop-off and hotspot return',
|
|
66
73
|
'Insulated thermal delivery bags, pizza bags, and sturdy drink carriers',
|
|
67
74
|
'Business percentage of your smartphone purchase and monthly cellular data plan',
|
|
68
75
|
'Fast Pay instant cashout fees and bank transfer charges',
|
|
@@ -70,8 +77,8 @@ export const GIG_PLATFORMS = [
|
|
|
70
77
|
'Mileage tracking subscription (Stride, Gridwise, Everlance) and tax prep fees',
|
|
71
78
|
],
|
|
72
79
|
tips: [
|
|
80
|
+
'Separate your 2026 delivery mileage log by half-year: IRS Announcement 2026-11 increased the business rate from $0.725/mi (Jan–Jun) to $0.76/mi starting July 1, 2026.',
|
|
73
81
|
'Start your mileage tracker when you leave to pick up your first order and stop only when you end your Dash—DoorDash only estimates active delivery miles.',
|
|
74
|
-
'Skip Fast Pay fees when possible or record every $1.99 instant transfer fee as a deductible Schedule C bank/merchant charge.',
|
|
75
82
|
'Monitor your net earnings per total mile: if a batch pays under $1.25/mile round-trip, vehicle depreciation and SE tax can wipe out your margin.',
|
|
76
83
|
],
|
|
77
84
|
rivals: ['uber', 'instacart', 'amazon-flex', 'lyft'],
|
|
@@ -86,7 +93,7 @@ export const GIG_PLATFORMS = [
|
|
|
86
93
|
},
|
|
87
94
|
{
|
|
88
95
|
q: 'Can Dashers deduct insulated hot bags and phone plans?',
|
|
89
|
-
a: 'Yes. Thermal bags, drink caddies, phone mounts, and the business-use percentage of your cell phone bill are ordinary and necessary Schedule C expenses you can deduct alongside the $0.
|
|
96
|
+
a: 'Yes. Thermal bags, drink caddies, phone mounts, and the business-use percentage of your cell phone bill are ordinary and necessary Schedule C expenses you can deduct alongside the 2026 standard mileage rate ($0.725/mi Jan–Jun & $0.76/mi Jul–Dec).',
|
|
90
97
|
},
|
|
91
98
|
{
|
|
92
99
|
q: 'Do DoorDash drivers qualify for the 20% QBI deduction?',
|
|
@@ -98,7 +105,7 @@ export const GIG_PLATFORMS = [
|
|
|
98
105
|
slug: 'instacart',
|
|
99
106
|
name: 'Instacart',
|
|
100
107
|
roleLabel: 'Full-Service Shopper',
|
|
101
|
-
tagline: 'Calculate 2026 Instacart Shopper 1099-NEC taxes, $0.
|
|
108
|
+
tagline: 'Calculate 2026 Instacart Shopper 1099-NEC taxes, split 2026 IRS delivery mileage deductions ($0.725/mi Jan–Jun & $0.76/mi Jul–Dec), equipment write-offs, and net hourly pay.',
|
|
102
109
|
supportsMileage: true,
|
|
103
110
|
defaultGrossRevenue: 34000,
|
|
104
111
|
defaultMiles: 16500,
|
|
@@ -109,7 +116,7 @@ export const GIG_PLATFORMS = [
|
|
|
109
116
|
taxFormLabel: 'Form 1099-NEC',
|
|
110
117
|
platformFeeNote: 'Instacart issues Form 1099-NEC for your full batch pay, heavy-order bumps, and customer tips with 0% commission subtracted from your reported payout.',
|
|
111
118
|
commonDeductions: [
|
|
112
|
-
'IRS Standard Mileage ($0.
|
|
119
|
+
'IRS Standard Mileage ($0.725/mi Jan 1–Jun 30 & $0.76/mi Jul 1–Dec 31, 2026) driving between stores and customer drop-offs',
|
|
113
120
|
'Collapsible grocery wagon, stair-climbing cart, and heavy-duty tote crates',
|
|
114
121
|
'Insulated freezer bags, ice packs, and temperature-controlled coolers',
|
|
115
122
|
'Business share of smartphone hardware, unlimited data plan, and portable power banks',
|
|
@@ -117,8 +124,8 @@ export const GIG_PLATFORMS = [
|
|
|
117
124
|
'Mileage-tracking apps, gloves/rain gear, and Schedule C tax preparation software',
|
|
118
125
|
],
|
|
119
126
|
tips: [
|
|
127
|
+
'Split your 2026 mileage log at July 1: business miles driven Jan 1–Jun 30 deduct at $0.725/mi while Jul 1–Dec 31 miles qualify for the $0.76/mi mid-year IRS rate.',
|
|
120
128
|
'Instacart involves substantial in-store shopping time, so your miles-per-dollar are lower than rideshare—make sure you capture every phone, wagon, and cooler deduction.',
|
|
121
|
-
'Keep receipts for folding delivery wagons and freezer bags; tools used exclusively for batches are 100% deductible in the year purchased.',
|
|
122
129
|
'Check whether you also drive for DoorDash or Uber—keep one unified mileage log across apps without overlapping or double-counting miles.',
|
|
123
130
|
],
|
|
124
131
|
rivals: ['doordash', 'amazon-flex', 'uber', 'lyft'],
|
|
@@ -145,7 +152,7 @@ export const GIG_PLATFORMS = [
|
|
|
145
152
|
slug: 'amazon-flex',
|
|
146
153
|
name: 'Amazon Flex',
|
|
147
154
|
roleLabel: 'Parcel Delivery Partner',
|
|
148
|
-
tagline: 'Calculate 2026 Amazon Flex 1099-NEC taxes, block mileage deductions
|
|
155
|
+
tagline: 'Calculate 2026 Amazon Flex 1099-NEC taxes, split 2026 IRS block mileage deductions ($0.725/mi Jan–Jun & $0.76/mi Jul–Dec), quarterly IRS estimates, and real after-tax hourly pay.',
|
|
149
156
|
supportsMileage: true,
|
|
150
157
|
defaultGrossRevenue: 42000,
|
|
151
158
|
defaultMiles: 24000,
|
|
@@ -156,7 +163,7 @@ export const GIG_PLATFORMS = [
|
|
|
156
163
|
taxFormLabel: 'Form 1099-NEC',
|
|
157
164
|
platformFeeNote: 'Amazon Flex pays your full block offer plus Fresh/Whole Foods tips on Form 1099-NEC with 0% platform commission deducted.',
|
|
158
165
|
commonDeductions: [
|
|
159
|
-
'IRS Standard Mileage ($0.
|
|
166
|
+
'IRS Standard Mileage ($0.725/mi Jan 1–Jun 30 & $0.76/mi Jul 1–Dec 31, 2026) from pickup station through final parcel delivery',
|
|
160
167
|
'Folding hand truck, parcel sorting totes, and trunk cargo organizers',
|
|
161
168
|
'Headlamp, reflective safety vest, and weatherproof delivery boots/rain jacket',
|
|
162
169
|
'Business portion of smartphone, unlimited data plan, and dash mount/chargers',
|
|
@@ -164,7 +171,7 @@ export const GIG_PLATFORMS = [
|
|
|
164
171
|
'Mileage tracking app subscription and Schedule C bookkeeping/tax filing tools',
|
|
165
172
|
],
|
|
166
173
|
tips: [
|
|
167
|
-
'
|
|
174
|
+
'Log odometer readings separately before and after July 1, 2026—high-mileage suburban blocks generate $0.725/mi (H1) and $0.76/mi (H2) write-offs often exceeding 40% of gross pay.',
|
|
168
175
|
'Be conservative on commuting miles: driving from home to your first warehouse pickup may be non-deductible commuting unless you maintain a qualifying administrative home office.',
|
|
169
176
|
'Factor return-trip miles after your last stop when evaluating whether a base-rate block actually beats your local after-tax minimum wage.',
|
|
170
177
|
],
|
|
@@ -175,16 +182,16 @@ export const GIG_PLATFORMS = [
|
|
|
175
182
|
a: 'Under IRS commuting rules, driving from home to your first regular pickup station is generally commuting unless your home qualifies as your principal place of business (administrative home office). Miles between the warehouse, every customer stop, and between multiple blocks are fully deductible.',
|
|
176
183
|
},
|
|
177
184
|
{
|
|
178
|
-
q: 'How much does the $0.
|
|
179
|
-
a: 'At 24,000 business miles
|
|
185
|
+
q: 'How much does the 2026 IRS mileage deduction ($0.725/$0.76/mi) save an Amazon Flex driver?',
|
|
186
|
+
a: 'At 24,000 business miles split evenly across the year (12,000 mi Jan–Jun at $0.725/mi + 12,000 mi Jul–Dec at $0.76/mi), the 2026 IRS rates create a $17,820 Schedule C write-off. Because every dollar of Schedule C expense reduces both 15.3% self-employment tax and your marginal income tax bracket, that deduction often cuts your annual IRS bill by $3,800 to $5,500+.',
|
|
180
187
|
},
|
|
181
188
|
{
|
|
182
189
|
q: 'Are Whole Foods and Amazon Fresh tips included on my 1099-NEC?',
|
|
183
190
|
a: 'Yes. Amazon combines base block pay and customer tips from Fresh/Whole Foods routes into one Form 1099-NEC total.',
|
|
184
191
|
},
|
|
185
192
|
{
|
|
186
|
-
q: 'Can I deduct car repairs and gas if I claim
|
|
187
|
-
a: 'No. The $0.
|
|
193
|
+
q: 'Can I deduct car repairs and gas if I claim the 2026 IRS standard mileage rate?',
|
|
194
|
+
a: 'No. The 2026 standard mileage rate ($0.725/mi Jan–Jun and $0.76/mi Jul–Dec) replaces actual fuel, oil changes, tires, repairs, registration, and vehicle depreciation. You can still deduct tolls, parking, sorting gear, and your business phone share separately.',
|
|
188
195
|
},
|
|
189
196
|
],
|
|
190
197
|
},
|
|
@@ -192,7 +199,7 @@ export const GIG_PLATFORMS = [
|
|
|
192
199
|
slug: 'lyft',
|
|
193
200
|
name: 'Lyft',
|
|
194
201
|
roleLabel: 'Rideshare Driver',
|
|
195
|
-
tagline: 'Estimate 2026 Lyft 1099-NEC & 1099-K self-employment taxes, $0.
|
|
202
|
+
tagline: 'Estimate 2026 Lyft 1099-NEC & 1099-K self-employment taxes, split 2026 IRS mileage deductions ($0.725/mi Jan–Jun & $0.76/mi Jul–Dec), and real net take-home pay per hour.',
|
|
196
203
|
supportsMileage: true,
|
|
197
204
|
defaultGrossRevenue: 48000,
|
|
198
205
|
defaultMiles: 26000,
|
|
@@ -203,7 +210,7 @@ export const GIG_PLATFORMS = [
|
|
|
203
210
|
taxFormLabel: 'Form 1099-NEC & 1099-K',
|
|
204
211
|
platformFeeNote: 'Lyft bank deposits and net driver earnings exclude Lyft platform/service fees (0% cut needed when entering actual driver payouts). If you enter gross passenger charges from a 1099-K, include Lyft fees from your Annual Tax Summary as an expense.',
|
|
205
212
|
commonDeductions: [
|
|
206
|
-
'IRS Standard Mileage ($0.
|
|
213
|
+
'IRS Standard Mileage ($0.725/mi Jan 1–Jun 30 & $0.76/mi Jul 1–Dec 31, 2026) for online, en-route, and passenger trip miles',
|
|
207
214
|
'Express Pay instant cashout fees and Lyft platform fees (if reporting gross 1099-K)',
|
|
208
215
|
'Business percentage of smartphone hardware and unlimited cellular data plan',
|
|
209
216
|
'Car washes, interior detailing, odor eliminators, and seat protectors',
|
|
@@ -211,9 +218,9 @@ export const GIG_PLATFORMS = [
|
|
|
211
218
|
'Rideshare insurance endorsement delta, tolls, airport fees, and tax software',
|
|
212
219
|
],
|
|
213
220
|
tips: [
|
|
221
|
+
'Split your 2026 mileage log at July 1: under IRS Announcement 2026-11, Jan–Jun miles deduct at $0.725/mi while Jul–Dec miles deduct at $0.76/mi.',
|
|
214
222
|
'Reconcile your Lyft Annual Summary against bank deposits before filing so you never accidentally pay tax on Lyft’s passenger-side platform fees shown on Form 1099-K.',
|
|
215
223
|
'If you drive both Lyft and Uber in the same shift, track continuous online business mileage once—never claim the same trip mile on two Schedule C logs.',
|
|
216
|
-
'Keep receipts for interior detailing and seat covers; rideshare wear-and-tear cleaning expenses are deductible on top of the standard mileage rate.',
|
|
217
224
|
],
|
|
218
225
|
rivals: ['uber', 'doordash', 'instacart', 'amazon-flex'],
|
|
219
226
|
faqs: [
|
|
@@ -230,8 +237,8 @@ export const GIG_PLATFORMS = [
|
|
|
230
237
|
a: 'You may combine all rideshare driving under one Schedule C rideshare business or separate logs, provided every business mile is counted strictly once when either app is online and actively working.',
|
|
231
238
|
},
|
|
232
239
|
{
|
|
233
|
-
q: 'How much tax does the 2026 $0.
|
|
234
|
-
a: 'Driving 26,000 business miles
|
|
240
|
+
q: 'How much tax does the 2026 IRS mileage rate ($0.725/$0.76/mi) save a Lyft driver?',
|
|
241
|
+
a: 'Driving 26,000 business miles split evenly across the year (13,000 mi H1 at $0.725/mi + 13,000 mi H2 at $0.76/mi) produces a $19,305 Schedule C deduction, typically cutting combined self-employment and federal/state income taxes by $4,100 to $6,200+ per year.',
|
|
235
242
|
},
|
|
236
243
|
],
|
|
237
244
|
},
|
|
@@ -20,7 +20,7 @@ export declare const IRS_SOURCES_2026: {
|
|
|
20
20
|
readonly authority: "IRS";
|
|
21
21
|
};
|
|
22
22
|
readonly mileageRates: {
|
|
23
|
-
readonly label: "IRS Standard Mileage Rates (2026
|
|
23
|
+
readonly label: "IRS Standard Mileage Rates (2026: $0.725/mi Jan–Jun & $0.76/mi Jul–Dec, Announcement 2026-11)";
|
|
24
24
|
readonly url: "https://www.irs.gov/tax-professionals/standard-mileage-rates";
|
|
25
25
|
readonly authority: "IRS";
|
|
26
26
|
};
|
|
@@ -15,7 +15,7 @@ export const IRS_SOURCES_2026 = {
|
|
|
15
15
|
authority: 'IRS',
|
|
16
16
|
},
|
|
17
17
|
mileageRates: {
|
|
18
|
-
label: 'IRS Standard Mileage Rates (2026
|
|
18
|
+
label: 'IRS Standard Mileage Rates (2026: $0.725/mi Jan–Jun & $0.76/mi Jul–Dec, Announcement 2026-11)',
|
|
19
19
|
url: 'https://www.irs.gov/tax-professionals/standard-mileage-rates',
|
|
20
20
|
authority: 'IRS',
|
|
21
21
|
},
|
package/dist/lib/gigEngine.d.ts
CHANGED
|
@@ -3,7 +3,12 @@ export interface GigTaxInput {
|
|
|
3
3
|
grossRevenue: number;
|
|
4
4
|
platformFeePct: number;
|
|
5
5
|
supportsMileage: boolean;
|
|
6
|
+
/** Total annual business miles (split 50/50 across H1 & H2 if milesH1/milesH2 are omitted) */
|
|
6
7
|
milesDriven: number;
|
|
8
|
+
/** Optional Jan 1 – Jun 30, 2026 business miles deducted at $0.725/mi (IRS Notice 2026-10) */
|
|
9
|
+
milesH1?: number;
|
|
10
|
+
/** Optional Jul 1 – Dec 31, 2026 business miles deducted at $0.76/mi (IRS Announcement 2026-11) */
|
|
11
|
+
milesH2?: number;
|
|
7
12
|
otherExpenses: number;
|
|
8
13
|
hoursPerWeek: number;
|
|
9
14
|
stateSlug: string;
|
|
@@ -15,6 +20,10 @@ export interface GigTaxResult {
|
|
|
15
20
|
grossRevenue: number;
|
|
16
21
|
platformFee: number;
|
|
17
22
|
netPayoutBeforeExpenses: number;
|
|
23
|
+
milesH1: number;
|
|
24
|
+
milesH2: number;
|
|
25
|
+
mileageDeductionH1: number;
|
|
26
|
+
mileageDeductionH2: number;
|
|
18
27
|
mileageDeduction: number;
|
|
19
28
|
otherExpenses: number;
|
|
20
29
|
totalDeductions: number;
|
package/dist/lib/gigEngine.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IRS_2026_MILEAGE_RATE_H1, IRS_2026_MILEAGE_RATE_H2, } from '../data/gigPlatforms.js';
|
|
2
2
|
import { calculateFederalAndState1099 } from './taxEngine.js';
|
|
3
3
|
function clampNonNeg(val) {
|
|
4
4
|
return Number.isFinite(val) && val > 0 ? val : 0;
|
|
@@ -8,8 +8,22 @@ export function calculateGigTax(input) {
|
|
|
8
8
|
const feePct = Math.min(1, clampNonNeg(input.platformFeePct));
|
|
9
9
|
const platformFee = grossRevenue * feePct;
|
|
10
10
|
const netPayoutBeforeExpenses = Math.max(0, grossRevenue - platformFee);
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
let milesH1 = 0;
|
|
12
|
+
let milesH2 = 0;
|
|
13
|
+
if (input.supportsMileage) {
|
|
14
|
+
if (input.milesH1 !== undefined || input.milesH2 !== undefined) {
|
|
15
|
+
milesH1 = clampNonNeg(input.milesH1 ?? 0);
|
|
16
|
+
milesH2 = clampNonNeg(input.milesH2 ?? 0);
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
const totalMiles = clampNonNeg(input.milesDriven);
|
|
20
|
+
milesH1 = totalMiles / 2;
|
|
21
|
+
milesH2 = totalMiles / 2;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
const mileageDeductionH1 = milesH1 * IRS_2026_MILEAGE_RATE_H1;
|
|
25
|
+
const mileageDeductionH2 = milesH2 * IRS_2026_MILEAGE_RATE_H2;
|
|
26
|
+
const mileageDeduction = mileageDeductionH1 + mileageDeductionH2;
|
|
13
27
|
const otherExpenses = clampNonNeg(input.otherExpenses);
|
|
14
28
|
const totalDeductions = mileageDeduction + otherExpenses;
|
|
15
29
|
const withDeductions = calculateFederalAndState1099({
|
|
@@ -37,6 +51,10 @@ export function calculateGigTax(input) {
|
|
|
37
51
|
grossRevenue,
|
|
38
52
|
platformFee,
|
|
39
53
|
netPayoutBeforeExpenses,
|
|
54
|
+
milesH1,
|
|
55
|
+
milesH2,
|
|
56
|
+
mileageDeductionH1,
|
|
57
|
+
mileageDeductionH2,
|
|
40
58
|
mileageDeduction,
|
|
41
59
|
otherExpenses,
|
|
42
60
|
totalDeductions,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clearmargin-tax-engine",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Audited 2026 US 1099 self-employment tax (IRS Schedule SE + 51 jurisdictions), gig mileage, and 23-platform reverse-pricing TypeScript engine powering ClearMargin.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|