Skip to content

YTDEarnings

Some tax calculations involve annual caps in determining the TaxAmount. In order for these caps to be applied correctly, all previous earnings (i.e., earned before the current pay period) should be entered here. Each tax which uses this information is noted as such in its Instructions property.

As an example, suppose an employee with a biweekly pay period earns $4000 and you would like to compute Social Security tax for the period. If previous earnings are $63,000, and filing status is Single, you would set the following properties:

// using TaxControls;
try {
CTaxControl tc = new CTaxControl();
tc.DataFilename = "us.dat";
tc.SelectedTax = "FICA SS";
tc.PayPeriodsPerYear = 26;
tc.FilingStatus = FilingSingle;
tc.Earnings = 4000.00;
tc.YTDEarnings = 63000.00;
Console.WriteLine(tc.TaxAmount());
} catch (TaxControlException e) {
Console.WriteLine(e.Message);
}
//import com.boondocks.taxcontrols.*;
try {
TaxControl tc = new TaxControl();
tc.setDataFilename("us.dat");
tc.setSelectedTax("FICA SS");
tc.setPayPeriodsPerYear(26);
tc.setFilingStatus(FilingSingle);
tc.setEarnings(4000.00);
tc.setYTDEarnings(63000.00);
System.out.println(tc.TaxAmount());
} catch (TaxControlException e) {
e.printStackTrace();
}

This employee’s earnings have not surpassed the Social Security annual cap, so the TaxAmount computation will apply the FICA SS percentage to all of the $4000 in Earnings.

If, however, the employee’s YTDEarnings combined with Earnings have surpassed the current annual cap, then only

min(
Earnings,
max(FICA SS Wage Base - YTDEarnings , 0)
)

would be taxable, which means only a portion (or none) of the earnings would be taxed.

Syntax

value = object.

object. value

Part Description
object A TaxControl object.
value A float result/expression.