Custody calculations