Based on density functional theory, the geometric structures of SnO2 and transition metal (M) V-, Cr-, and Mn-doped SnO2 were studied by an ultrasoft pseudopotential implemented in the plane wave method. The geometrical parameters, density of states, and magnetic properties were calculated. By comparing two kinds of dopants with concentrations of 6.25% or 12.5%, no significant changes were observed for the electronic and magnetic properties of these systems. The O atom tended to be attracted by the M and the bond distance between O and the metal was shortened. After doping with M, spin polarization appeared near the Fermi surface and the SnO2 doped with V and Cr had a half-metal nature, but the system containing Mn did not show such behavior. The impurity concentration had little effect on the spin and magnetic moment. The magnetic moment of the M doped SnO2 mainly originated from the 3d spin polarization and was also related to the electron configuration. The total magnetic moments of the SnO2 doped with V, Cr, and Mn were 0.94 mu(B), 2.044 mu(B), and 3.00 mu(B), respectively. These magnetic moments mainly originate from the 3d spin polarization as some negative moments exist for O and the Sn atom contributes little to the magnetic moment.