Rachuba documentation

What is Rachuba

Rachuba is payroll for a company with one employee. It computes each paycheck from gross to net with the published federal and state tables, records every paid run in a ledger kept under version control, and says what money has to move, where, and by when. It also projects the employee's own federal return for the year, so the estimated tax still owed and the worth of each retirement choice are known before the year closes.

Rachuba does not move money. The operator deposits federal employment taxes through EFTPS and sends the employee's 401(k) deferral to the plan trustee. Rachuba computes and tracks those two payment dates. It shows federal payroll form due dates but does not record filings; state payroll deadlines are outside the ledger. See due dates and limits.

What it computes

  • Federal income tax withholding by Worksheet 1A of Publication 15-T, Social Security, Medicare and the Additional Medicare Tax, and FUTA.
  • State withholding for California (DE 44 Method B, SDI, UI, the Employment Training Tax) and New York (the exact calculation method, New York City and Yonkers, DBL, Paid Family Leave). Any other state is refused, never treated as zero.
  • 401(k) elective deferrals held under the year's limit, and an employer contribution held under 25% of compensation and the section 415(c) limit.
  • Line values for Forms 941, 940 and W-2.
  • The employee's own Form 1040 projection: tax, estimated tax installments, 401(k) room and IRA eligibility.

Every amount is a whole number of cents and every rate a whole number of parts per million; no floating point touches a dollar.

The monthly routine

  1. rachuba run --pay-date <date> --commit computes the paycheck and appends it to the ledger.
  2. Pay the employee the net figure.
  3. Send the elective deferral to the plan trustee, then rachuba remitted --pay-date <date>.
  4. Deposit the Form 941 taxes through EFTPS, then rachuba deposited --pay-date <date>.
  5. Commit the ledger.

rachuba owed lists whatever from steps 3 and 4 has not happened and exits 1 once one of their due dates has passed. The full list of dates is on due dates.

Where the data lives

Two files hold everything about one company: rachuba.toml, the payer, the employee, the withholding certificates, the elections and the household's return figures; and ledger.toml, every committed run. Both belong in the company's own private repository, never in Rachuba's. No Social Security number is stored: pay stubs carry the last four digits. Details: configuration.

Tax tables are data

Each tax year is a folder of TOML section files transcribed from that year's publications, every figure carrying its citation: tables/federal-<year>/ and tables/state-<code>-<year>/. Rolling to a new year is a transcription, not a code change. A malformed or out-of-order schedule, a key defined in two files, or a stray file in a folder is refused when the tables load.