Helical ribbons arise in many biological and engineered systems, often driven by anisotropic surface stress, residual strain, and geometric or elastic mismatch between layers of a laminated composite. A full mathematical analysis is developed to analytically predict the equilibrium deformed helical shape of an initially flat, straight ribbon, with prescribed magnitudes and orientations of the principal curvatures when subjected to arbitrary surface stress and/or internal residual strain distribution. The helix angle, radius, axis and chirality of the deformed helical ribbons are predicted with a comprehensive, three-dimensional model that incorporates elasticity, differential geometry, and variational principles. In general, the mechanical anisotropy (e.g., in surface/external stress, residual strain or elastic modulus) will lead to spontaneous, three-dimensional helical deformations. Ring shapes are formed when the principle axes of deformation coincide with the geometric axes of the ribbon. The transition from cylindrical helical ribbons to purely twisted ribbons, or tubular structures is controlled by tuning relevant geometric parameters. Analytic, closed-form predictions of the ribbon shapes are validated with simple, table-top experiments. This theoretical approach represent a tool to inform the design of materials and systems in order to achieve desired helical geometries on demand.