obbbabreaks

package module
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2026 License: MIT Imports: 0 Imported by: 0

README

obbba-breaks

Go Reference

The family of tax breaks governed by the One Big Beautiful Bill Act (OBBBA, 2025) and related permanent provisions, modeled independently so caps and phase-outs never double-count:

  • Child Tax Credit (§24) — $2,200/child, PERMANENT (does not sunset 2028).
  • SALT cap (§164(b)(6)) — $40,400 through 2029, reverts to $10,000 in 2030.
  • No-tax-on-tips deduction (§224) — $25,000 flat per return (marriage penalty), 2025-2028.
  • Senior deduction (§512) — +$6,000 single / +$12,000 MFJ (both 65+), 2025-2028.
  • Car-loan interest deduction (§163(h)(4)) — $10,000, NEW US-assembled vehicle, 2025-2028.

Pure, dependency-free Go math — the same engine behind the taxbreakcalc.com tax-break calculator suite.

Install

go get github.com/theluckystrike/obbba-breaks

Quick example

package main

import (
	"fmt"

	obbbabreaks "github.com/theluckystrike/obbba-breaks"
)

func main() {
	// 2 kids, single, MAGI $80k
	ctc := obbbabreaks.ChildTaxCredit(2, obbbabreaks.Single, 80_000.0)
	fmt.Println(ctc.Savings) // 4400 (dollar-for-dollar credit)

	// SALT: $50k paid in 2026 -> capped at $40,400
	salt := obbbabreaks.SALTCap(50_000.0, 2026)
	fmt.Println(salt.Deductible) // 40400

	// Tips: $30k tips, single, 22% bracket -> capped $25k
	tips := obbbabreaks.TipsDeduction(30_000.0, obbbabreaks.Single, 0.0, 0.22)
	fmt.Println(tips.Savings) // 5500 (25000 * 0.22)
}

API

Function Description
ChildTaxCredit(children int, fs FilingStatus, magi float64) Result §24 credit, $2,200/child, phase-out $200k/$400k.
SALTCap(stateLocalTaxPaid float64, year int) Result §164(b)(6) itemized cap ($40,400 → $10,000 in 2030).
TipsDeduction(qualifiedTips float64, fs FilingStatus, magi, marginalRate float64) Result §224 above-the-line deduction, $25k flat cap.
SeniorDeduction(spouses65 int, fs FilingStatus, magi, marginalRate float64) Result §512 additional senior deduction.
CarLoanInterestDeduction(interestPaid float64, isNewVehicleUSAAssembly bool, fs FilingStatus, magi, marginalRate float64) Result §163(h)(4) car-loan interest; gated on new US-assembled vehicle.

Each Result reports GrossAmount, Capped, Deductible (after phase-out), IsCredit, and Savings (federal tax value), so callers can sum savings across provisions without double-counting caps.

Verification

All figures verified against IRS / Joint Committee on Taxation / Tax Foundation primary sources. Note: energy/EV credits (§25D/§30D/§25E) were TERMINATED by OBBBA for 2026 and are deliberately NOT modeled here.

License

MIT.

Documentation

Overview

Package obbbabreaks implements the family of tax breaks governed by the One Big Beautiful Bill Act (OBBBA, 2025) and related permanent provisions: the child tax credit (§24, permanent), the SALT cap (§164(b)(6), $40,400 through 2029 then $10,000 from 2030), the no-tax-on-tips deduction (§224, 2025-2028), the senior deduction (§512, 2025-2028), and the car-loan interest deduction (§163(h)(4), 2025-2028). It is the same math behind the taxbreakcalc.com multi-provision tax-break calculator suite.

Each break is modeled independently with its own cap, phase-out, and (where applicable) credit-vs-deduction character, so a caller can sum Savings across provisions without double-counting caps.

The child tax credit modeled by ChildTaxCredit — the $2,200 per qualifying child amount, the $200,000/$400,000 MAGI thresholds and the $50-per-$1,000 phase-out step — is documented with worked examples and an interactive version at https://taxbreakcalc.com/child-tax-credit-calculator/

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Break

type Break int

Break identifies a provision.

const (
	BreakChildTaxCredit Break = iota
	BreakSALTCap
	BreakTipsDeduction
	BreakSeniorDeduction
	BreakCarLoanInterest
)

type FilingStatus

type FilingStatus int

Filing status selects per-provision caps and phase-out thresholds.

const (
	Single FilingStatus = iota
	Joint
	HeadOfHousehold
)

type Result

type Result struct {
	Break        Break
	Eligible     bool    // gross amount before cap and phase-out
	GrossAmount  float64 // the provision's full statutory amount
	Capped       float64 // after the per-return/per-child cap
	Deductible   float64 // after MAGI phase-out (the actual claimable amount)
	IsCredit     bool    // true for credits (dollar-for-dollar); false for deductions
	MarginalRate float64 // rate applied to deductions
	Savings      float64 // federal tax value (credit: dollar-for-dollar; deduction: x marginal rate)
}

Result is the per-break outcome.

func CarLoanInterestDeduction

func CarLoanInterestDeduction(interestPaid float64, isNewVehicleUSAAssembly bool, fs FilingStatus, magi, marginalRate float64) Result

CarLoanInterestDeduction returns the §163(h)(4) car-loan interest deduction. Requires isNewVehicleUSAAssembly=true to be eligible (the statute gates the deduction on a new, US-assembled vehicle under 14,000 lbs).

func ChildTaxCredit

func ChildTaxCredit(children int, fs FilingStatus, magi float64) Result

ChildTaxCredit returns the §24 child tax credit for `children` qualifying children at a given MAGI. The full $2,200/child is modeled (the refundable split is upstream bookkeeping).

func SALTCap

func SALTCap(stateLocalTaxPaid float64, year int) Result

SALTCap returns the capped SALT deduction. Pass year to select the cap (2025-2029 -> $40,400; 2030+ -> $10,000).

func SeniorDeduction

func SeniorDeduction(spouses65 int, fs FilingStatus, magi, marginalRate float64) Result

SeniorDeduction returns the §512 additional senior deduction. spouses65 is the count of spouses aged 65+ on the return (1 or 2; for single filers pass 1).

func TipsDeduction

func TipsDeduction(qualifiedTips float64, fs FilingStatus, magi, marginalRate float64) Result

TipsDeduction returns the §224 above-the-line deduction for qualified tips. $25,000 flat per return; MAGI phase-out -100/$1k over $150k/$300k.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL