We present a Rayleigh–Ritz method for the approximation of fluid flow in a curved duct, including the secondary cross-flow, which is well known to develop for nonzero Dean numbers. Having a straightforward method to estimate the cross-flow for ducts with a variety of cross-sectional shapes is important for many applications. One particular example is in microfluidics where curved ducts with low aspect ratio are common, and there is an increasing interest in nonrectangular duct shapes for the purpose of size-based cell separation. We describe functionals which are minimized by the axial flow velocity and cross-flow stream function which solve an expansion of the Navier–Stokes model of the flow. A Rayleigh–Ritz method is then obtained by computing the coefficients of an appropriate polynomial basis, taking into account the duct shape, such that the corresponding functionals are stationary. Whilst the method itself is quite general, we describe an implementation for a particular family of duct shapes in which the top and bottom walls are described by a polynomial with respect to the lateral coordinate. Solutions for a rectangular duct and two nonstandard duct shapes are examined in detail. A comparison with solutions obtained using a finite-element method demonstrates the rate of convergence with respect to the size of the basis. An implementation for circular cross-sections is also described, and results are found to be consistent with previous studies.