The magnetic properties of axially confined, hydrogenated single-walled carbon nanotubes (SWCNTs) of the (n,0)-type with n=5–24 are systematically explored by density functional theory. Emphasis is placed on the relation between the ground-state magnetic moments of SWCNTs and zigzag graphene nanoribbons (ZGNRs). Comparison between the SWCNTs considered here and ZGNRs of equal length gives rise to two basic questions: 1) how does the nanotube curvature affect the antiferromagnetic order known to prevail for ZGNRs, and 2) to what extent do the magnetic moments localized at the SWCNT edges deviate from the zero-curvature limit of n/3 μB? In response to these questions, it is found that systems with n≥7 display preference for antiferromagnetic order at any length investigated, whereas for n=5, 6 the magnetic phase varies with tube length. Furthermore, elementary patterns are identified that describe the progression of the magnitude of the magnetic moment with n for the longest tubes explored in this work. The spin densities of the considered SWCNTs are analyzed as a function of the tube length L, with L ranging from 3 to 11 transpolyene rings for n≥7 and from 3 to 30 rings for n=5 and 6.