Cal. FAM § 3040
This is the official text of Cal. FAM § 3040, part of California’s Family Code — governs marriage, divorce, child custody and support, domestic violence protections, and adoption. This particular section falls under Division 8, “Custody of Children.”
Not legal advice. This page reproduces the official text of a government statute for reference only. Laws change, and how a statute applies depends on your specific facts. For advice about your situation, consult a licensed attorney in your state.
Official statutory text
(a) Custody should be granted in the following order of preference according to the best interest of the child as provided in Sections 3011 and 3020:
(1) To both parents jointly pursuant to Chapter 4 (commencing with Section 3080) or to either parent. In making an order granting custody to either parent, the court shall consider, among other factors, which parent is more likely to allow the child frequent and continuing contact with the noncustodial parent, consistent with Sections 3011 and 3020. The court, in its discretion, may require the parents to submit to the court a plan for the implementation of the custody order.
(2) If to neither parent, to the person or persons in whose home the child has been living in a wholesome and stable environment.
(3) To any other person or persons deemed by the court to be suitable and able to provide adequate and proper care and guidance for the child.
(b) The immigration status of a parent, legal guardian, or relative shall not disqualify the parent, legal guardian, or relative from receiving custody under subdivision (a).
(c) The court shall not consider the sex, gender identity, gender expression, or sexual orientation of a parent, legal guardian, or relative in determining the best interest of the child under subdivision (a).
(d) (1) Commencing January 1, 2024, if a court finds that the effects of a parent’s, legal guardian’s, or relative’s history of or current mental illness are a factor in determining the best interest of the child under subdivision (a), the court shall do both of the following:
(A) Provide the parent, legal guardian, or relative with a list of local resources for mental health treatment.
(B) State its reasons for the finding in writing or on the record.
(2) This subdivision does not relieve a court from ensuring that the health, safety, and welfare of the child is the court’s primary concern in determining the best interests of children when making any order regarding the physical or legal custody, or visitation, of the child.
(e) This section establishes neither a preference nor a presumption for or against joint legal custody, joint physical custody, or sole custody, but allows the court and the family the widest discretion to choose a parenting plan that is in the best interest of the child, consistent with this section.
(f) In cases where a child has more than two parents, the court shall allocate custody and visitation among the parents based on the best interest of the child, including, but not limited to, addressing the child’s need for continuity and stability by preserving established patterns of care and emotional bonds. The court may order that not all parents share legal or physical custody of the child if the court finds that it would not be in the best interest of the child as provided in Sections 3011 and 3020.
(1) To both parents jointly pursuant to Chapter 4 (commencing with Section 3080) or to either parent. In making an order granting custody to either parent, the court shall consider, among other factors, which parent is more likely to allow the child frequent and continuing contact with the noncustodial parent, consistent with Sections 3011 and 3020. The court, in its discretion, may require the parents to submit to the court a plan for the implementation of the custody order.
(2) If to neither parent, to the person or persons in whose home the child has been living in a wholesome and stable environment.
(3) To any other person or persons deemed by the court to be suitable and able to provide adequate and proper care and guidance for the child.
(b) The immigration status of a parent, legal guardian, or relative shall not disqualify the parent, legal guardian, or relative from receiving custody under subdivision (a).
(c) The court shall not consider the sex, gender identity, gender expression, or sexual orientation of a parent, legal guardian, or relative in determining the best interest of the child under subdivision (a).
(d) (1) Commencing January 1, 2024, if a court finds that the effects of a parent’s, legal guardian’s, or relative’s history of or current mental illness are a factor in determining the best interest of the child under subdivision (a), the court shall do both of the following:
(A) Provide the parent, legal guardian, or relative with a list of local resources for mental health treatment.
(B) State its reasons for the finding in writing or on the record.
(2) This subdivision does not relieve a court from ensuring that the health, safety, and welfare of the child is the court’s primary concern in determining the best interests of children when making any order regarding the physical or legal custody, or visitation, of the child.
(e) This section establishes neither a preference nor a presumption for or against joint legal custody, joint physical custody, or sole custody, but allows the court and the family the widest discretion to choose a parenting plan that is in the best interest of the child, consistent with this section.
(f) In cases where a child has more than two parents, the court shall allocate custody and visitation among the parents based on the best interest of the child, including, but not limited to, addressing the child’s need for continuity and stability by preserving established patterns of care and emotional bonds. The court may order that not all parents share legal or physical custody of the child if the court finds that it would not be in the best interest of the child as provided in Sections 3011 and 3020.
Status: in_force · Read it on the official government site
Dealing with a child custody matter in California?
See all California Child Custody lawyers
About this page: Statute text is reproduced from official government publishers via the
Open US Law dataset
(Vaquill AI, snapshot v2026.08, CC BY 4.0). Primary legislative text like this is public domain under the government-edicts doctrine
(Georgia v. Public.Resource.Org, 2020). We link every section back to its official source so you can verify it independently.