Skip to content

Commit

Permalink
Add standard deduction to tax calculations. (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
neb417 authored Jan 14, 2024
1 parent a99ff28 commit e00b010
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/services/income_tax_calculator_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class IncomeTaxCalculatorService
def initialize(income:)
@income = income
@annual_income = income.weekly_income * 52
@standard_deduction = Money.new(1_460_000)
@fica_tax = calculate_fica_tax
@agi_deduction = calculate_agi_deduction
@agi = calculate_agi
Expand Down Expand Up @@ -46,7 +47,7 @@ def calculate_agi_deduction
end

def calculate_agi
@annual_income - @agi_deduction
@annual_income - (@agi_deduction + @standard_deduction)
end

def calculate_fed_tax
Expand Down

0 comments on commit e00b010

Please sign in to comment.