PolicyEngine / PolicyEngine/policyengine-us

Add a new variable for adjusted gross income for charitable deductions to align with IRC definition (§ 170(b)(1)(H))

Open
#5,415 0 comments 0 reactions 0 assignees View on GitHub
tax
Dominant language
Python
Stars
162
Forks
212
Avg merge
3d 3h
Merged PRs (30d)
96

Description

## Current behavior

The `positive_agi` variable is currently calculated as shown in:

https://github.com/PolicyEngine/policyengine-us/blob/0a5bb3c3c19903a564cd65210561274c1fe10158/policyengine_us/variables/gov/irs/income/taxable_income/adjusted_gross_income/positive_agi.py#L13

This is used in multiple places, including the `charitable_deduction` formula:

https://github.com/PolicyEngine/policyengine-us/blob/0a5bb3c3c19903a564cd65210561274c1fe10158/policyengine_us/variables/gov/irs/income/taxable_income/deductions/itemizing/charitable_deduction.py#L18

However, the **Internal Revenue Code (IRC)** defines the **contribution base** in [§ 170(b)(1)(H)](https://www.law.cornell.edu/uscode/text/26/170#b_1_H) as:

> **Contribution base** means **adjusted gross income (AGI), computed without regard to any net operating loss (NOL) carryback** to the taxable year (§ 172).

PolicyEngine does not currently distinguish between **AGI** and the **contribution base** as defined by the IRC, and no variables exist to represent **NOLs** or **NOL carrybacks**.

## Problem

Using `positive_agi` for charitable deductions:
1. Does not exclude **NOL carrybacks**, potentially **overstating allowable deductions** for taxpayers with reduced AGI due to NOLs.
2. Impacts other calculations that rely on `positive_agi`, creating potential inconsistencies if we try to modify `positive_agi` directly.

## Proposed solution

1. Create a new `nol_carrybacks` input variable
2. Create a new `charitable_deduction_contribution_base` variable which equals `adjusted_gross_income - nol_carrybacks`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.