The addition of carbenes CX(2) (X=H, Cl) to single-walled carbon nanotubes (SWNTs) was investigated by density functional theory and finite, hydrogen-terminated nanotube clusters or periodic boundary conditions in conjunction with basis sets of up to polarized triple-zeta quality. For armchair [(3,3) to (12,12)] and zigzag tubes [(3,0) to (18,0)], reaction of CH(2) with the C--C bond oriented along the tube axis (A) is less exothermic than with those C--C bonds having circumferential (C) orientation. This preference decreases monotonically with increasing tube diameter for armchair, but not for zigzag tubes; here, tubes with small band gaps have a very low preference for circumferential addition. Axial addition results in cyclopropane products, while circumferential addition produces "open" structures for both armchair and zigzag tubes. The barriers for addition of dichlorocarbene to a (5,5) SWNT, studied for a finite C(90)H(20) cluster, are higher than that for addition to C(60), in spite of similar diameters of the carbon materials. Whereas addition of CCl(2) to [60]fullerene proceeds in a concerted fashion, addition to a (5,5) armchair SWNT is predicted to occur stepwise and involve a diradicaloid intermediate according to B3LYP, PBE, and GVB-PP computations. Addition to C bonds of (5,5) armchair tubes resulting in the thermodynamically more stable insertion products is kinetically less favorable than that to A bonds yielding cyclopropane derivatives.