# frozen_string_literal: true module TaxCalculator module FICA SOCIAL_SECURITY_RATE = 6.2 SOCIAL_SECURITY_CUTOFF = 275_400.00 MEDICARE_RATE = 1.45 def self.taxes_for(income) if income >= SOCIAL_SECURITY_CUTOFF owed = ((SOCIAL_SECURITY_CUTOFF * SOCIAL_SECURITY_RATE / 100) + (income * MEDICARE_RATE / 100)) elsif owed = ((income * SOCIAL_SECURITY_RATE / 100) + (income * MEDICARE_RATE / 100)) end owed end end end