There is no easy standard for determining whether a confession was or was not voluntary. A court has to look at the totality of the circumstances to determine if the confession was voluntary.
The general rule is that a confession must be made freely and with the accused being fully aware of what he or she is doing. It must also be made without coercion. But it is not clear as to what, exactly, constitutes coercion. Therefore, courts typically need to look at such factors as how long the accused was in custody before the confession, how much interrogation went before the confession, and whether the person was allowed contact with family members and/or lawyers. The courts also need to look at what the police said to the accused. If they promised leniency, for example, or if they threaten further prosecution the confession may be invalid. Finally, it is also necessary to look at the nature of the accused. The court must look at the age of the accused and his/her mental capacity. It must look at whether the person was intoxicated. All of these things enter into the issue of whether a confession is voluntary.
So, a court cannot determine whether a confession is voluntary by one simple rule. It has to look at the totality of circumstances surrounding the confession.