We analyze the problem of quantum-limited estimation of a stochastically varying phase of a continuous beam (rather than a pulse) of the electromagnetic field. We consider both nonadaptive and adaptive measurements, and both dyne detection (using a local oscillator) and interferometric detection. We take the phase variation to be φ = √κξ(t), where ξ(t) is δ-correlated Gaussian noise. For a beam of power P, the important dimensionless parameter is N = Pℏωκ, the number of photons per coherence time. For the case of dyne detection, both continuous-wave (cw) coherent beams and cw (broadband) squeezed beams are considered. For a coherent beam a simple feedback scheme gives good results, with a phase variance ≃ N⁻¹/²/2. This is √2 times smaller than that achievable by nonadaptive (heterodyne) detection. For a squeezed beam a more accurate feedback scheme gives a variance scaling as N⁻²/³, compared to N⁻¹/² for heterodyne detection. For the case of interferometry only a coherent input into one port is considered. The locally optimal feedback scheme is identified, and it is shown to give a variance scaling as N⁻¹/². It offers a significant improvement over nonadaptive interferometry only for N of order unity.