If you've ever had to deal with a pair of earphones after they've become tangled, you know exactly what kind of mess they can make and what kind of pain they can be to untangle. Is there anything you can do about it?
Before we go any further, let's draw some lessons from science for how cords can almost spontaneously become tangled from the following video:
Now, let's get to the practical matter of finding out how likely your cords will become tangled. In the following tool, we've adapted the math developed by Dorian M. Raymer and Douglas E. Smith in their 2007 paper to calculate the probability that your cord/string/rope will become tangled, assuming that it is made of a medium-stiffness material, based upon its length. If you're reading this article on a site that republishes our RSS news feed, click here to access a working version of this tool!
If your cord has a relatively low probability of becoming knotted or tangled, say below 5 or 10%, you might not need to worry much about taking any special measures to keep it that way.
But, if you want to avoid the hassles that come from your cords becoming tangled, you might consider the suggestions from the video, using shorter, stiffer cords (if feasible) or getting smaller containers to store your longer cords (if not).
Meanwhile, if you're looking to learn more about knot theory, and yes, there is such a thing in maths, here's a quick introduction:
Raymer, Dorian M. and Smith, Douglas E. Spontaneous knotting of an agitated string. PNAS. October 16, 2007 104 (42) 16432-16437; https://doi.org/10.1073/pnas.0611320104. Note: For our tool, we corrected the L₀ parameter to be 1.025 after replicating the other parts of the authors' logistic function regression using the data presented in Figure 2, where our L₀ correction allowed us to replicate their reported probabilities for various cord lengths.