What is the formula for migration rate of DNA in agarose gel electrophoresis? Let's consider a typical agarose gel electrophoresis experiment. An appropriate quantity (not so much that it is overloaded, but not so little that it cannot be visualized) of linear DNA pieces with identical sequence and chemical structure is loaded onto the gel, and constant voltage is applied for a given time. I suspect that there is a function:

$x = f(V, t, l, c, k)$

Where the variables are:


$x$, cm, distance from well
$V$, Volt, potential difference across the gel
$t$, minutes, time over which the voltage is applied
$l$, bp, length of DNA fragments
$c$, gr/100 ml, density of the gel given in grams of agarose per 100 ml of buffer
$k$, a constant which is empirically determined for a given running buffer and gel tank


Basically, I want a formula into which I can plug in the size of my DNA and a few other parameters, and figure out how long I have to run it to get decent separation (the output variable is x because I intend to plot $x$ over $t$ for a given planned electrophoresis).

Is such a formula possible? What is it?

I have previously worked with gel documentation software which fits linear, polynomial and exponential functions to the DNA (I couldn't figure out exactly what kind of fitting the software was doing). However, after training a best-fit model on my ladder (with ~12 bands) and applying it to my samples of known size, I found all of these fits to be very inaccurate (5-10% error). Therefore, I suspect the equation governing the migration rate of DNA is in fact not a simple exponential function (as is often taught in college) but more complicated. Unfortunately, I lack the background in physical chemistry to derive the equation myself.

If you have a good argument for why the relation should be a simple exponent, eg. $x = e ^ {\alpha \cdot l}$, that is also an acceptable answer.
I guess my answer is very old, but here it is for newcomers searching the internet for this formula:

$$D = a - b \log(m)$$ 

where


$D$: Distance traveled for the restricted fragment.
$a$ and $b$: Constants depend on the electrophoresis experiment. 
$\log(m)$: The logarithm of the molecular weight ($m$)of the fragment.


Knowing $a,b$ and the distance traveled in your gel, you can easily determine the molecular weight of your fragment and its size by the following formula:

$$m = e^ \left(\frac{a-D}{b}\right)$$