Custody refers to the legal right to care for a child. A New York court may make custody determinations if a child has resided in the state for a minimum of six months. There are two types of custody that a New York court can assign: legal custody and residential custody. Legal custody is the right and responsibility to make decisions for a child. Residential custody is where a child will live. The court may make decisions about the custody of a child until the child is 18 years old. The court makes all custody decisions based on what it believes is in the best interest of the child, and does not favor one parent over the other on the basis of gender. The custody decisions may be made either by a judge or referee at trial, or in an agreement reached by both parents through the voluntary mediation process.