ca-child-support-guideline
v0.1.0
Published
Zero-dependency TypeScript library implementing California's statewide child support guideline formula (Family Code section 4055).
Maintainers
Readme
ca-child-support-guideline
A small, zero-dependency TypeScript library implementing California's statewide uniform guideline formula for child support, set out in California Family Code section 4055.
Given each parent's net monthly income, the parents' timeshare split, and the number of children, it returns the guideline monthly support amount and which parent owes it.
What this is (and is not)
This library implements the core arithmetic formula from Family Code 4055. It does not model every input a California court actually uses to calculate a final support order, such as:
- tax filing status and applicable deductions
- mandatory retirement or union dues
- health insurance premiums
- hardship deductions
- add on costs like childcare or uninsured medical expenses (Family Code section 4062)
California courts use certified calculation software (for example the Judicial Council's DissoMaster or XSpouse, and free public tools like the California Department of Child Support Services online calculator) to produce the official, presumptively correct guideline figure for a case. This library is for education, estimation, and prototyping. It is not legal advice, and the number it returns may differ from what a court would order once every statutory input is accounted for. County local rules and judicial discretion also affect real outcomes. If you need a figure for an actual case, consult a licensed California family law attorney or use a certified calculator.
The formula
Family Code section 4055 sets the statewide guideline as:
CS = K x [HN - (H%)(TN)] x child count multiplierWhere:
TNis the combined net monthly disposable income of both parents.HNis the higher earning parent's net monthly income.H%is the higher earning parent's percentage of time with the children (their physical timeshare).Kis an income scaled factor derived fromTN, described below.- The child count multiplier scales the one child amount up for additional children (1.0 for one child, 1.6 for two, 2.0 for three, and so on up through ten).
The K factor and the built in low income adjustment
K is derived from an income factor that changes with combined net
income TN:
TNat or below $800: the factor is0.2 + TN / 16000. This is the statute's built in low income adjustment: it scales down gently as combined income approaches zero instead of applying the flat rate used at moderate incomes.TNfrom $800 to $6,666: the factor is a flat0.25.TNfrom $6,666 to $10,000: the factor is0.1 + 1000 / TN.TNabove $10,000: the factor is0.12 + 800 / TN.
K itself then adjusts for whether the higher earner has majority or
minority timeshare: when the higher earner's timeshare H is below 50%,
K = (1 + H) x factor; otherwise K = (2 - H) x factor.
All net income and result amounts are monthly dollar figures.
Install
This package is not yet published to npm (see Roadmap below). Until then, install directly from GitHub:
npm install github:hayleyhenning90/ca-child-support-guidelineOr clone it and build locally:
git clone https://github.com/hayleyhenning90/ca-child-support-guideline.git
cd ca-child-support-guideline
npm install
npm run build
npm testUsage
import { calculateGuidelineSupport } from "ca-child-support-guideline";
const result = calculateGuidelineSupport({
parentANetMonthlyIncome: 5000,
parentBNetMonthlyIncome: 3000,
parentATimesharePercent: 50,
numberOfChildren: 1,
});
console.log(result);
// { monthlySupportAmount: 338, payingParent: "A" }calculateGuidelineSupport accepts:
| field | type | notes |
| --- | --- | --- |
| parentANetMonthlyIncome | number | Parent A's net monthly income in dollars, after taxes and mandatory deductions. |
| parentBNetMonthlyIncome | number | Parent B's net monthly income in dollars, on the same basis. |
| parentATimesharePercent | number | Parent A's percentage of the children's time, 0 to 100. Parent B is assumed to have the remainder. |
| numberOfChildren | number | Whole number of shared children, 1 or more. |
It returns:
| field | type | notes |
| --- | --- | --- |
| monthlySupportAmount | number | Guideline monthly support, rounded to the nearest dollar. Floored at 0. |
| payingParent | "A" | "B" | null | Which parent owes support, or null if the guideline amount is 0. |
The lower level incomeFactor(totalNetMonthlyIncome) function and the
CHILD_SUPPORT_MULTIPLIERS table are also exported if you want to inspect
or reuse the pieces of the formula directly.
Testing
Tests run with vitest and cover the flat income band, the low income adjustment band, the tapering bands above $6,666 and $10,000 combined income, minority versus majority timeshare for the higher earner, both parents as the higher earner, multiple children, and zero/edge case inputs.
npm testUsed in production
This library's formula is used in production by the free Virdix California Child Support Calculator: https://virdix.co/tools/california-child-support-calculator
Virdix (https://virdix.co) is a California divorce document preparation service.
Roadmap
- Publish to npm as
ca-child-support-guideline(not yet done; no package has been published as of this writing). - Optional CLI wrapper.
License
MIT. Copyright (c) 2026 Virdix. See LICENSE.
Disclaimer
This library and its README are provided for educational purposes. They do not constitute legal advice and do not create an attorney client relationship. California child support outcomes depend on facts and figures this formula does not capture, and on the court's discretion. For an authoritative calculation or advice about a specific case, consult a licensed California family law attorney or use certified court software.
