We prove variational forms of the Barban-Davenport-Halberstam Theorem and the large sieve inequality. We apply our result to prove an estimate for the sum of the squares of prime differences, averaged over arithmetic progressions.