Let*p(t, x, y)* be the fundamental solution of a linear, second order partial differential equation of parabolic type. The function*I* = −log*p* satisfies a nonlinear parabolic equation, which is the dynamic programming equation associated with a control problem of stochastic calculus of variations type. This gives a stochastic variational formula for*p.* The proof depends on a result of Molchanov about the asymptotic behavior of*p(t, x, y)* for small*t.*