Context : Aims : The sulphur compounds SO and \mathrm { SO } _ { 2 } have not been widely studied in the circumstellar envelopes of asymptotic giant branch ( AGB ) stars . By presenting and modelling a large number of SO and \mathrm { SO } _ { 2 } lines in the low mass-loss rate M-type AGB star R Dor , and modelling the available lines of those molecules in a further four M-type AGB stars , we aim to determine their circumstellar abundances and distributions . Methods : We use a detailed radiative transfer analysis based on the accelerated lambda iteration method to model circumstellar SO and \mathrm { SO } _ { 2 } line emission . We use molecular data files for both SO and \mathrm { SO } _ { 2 } that are more extensive than those previously available . Results : Using 17 SO lines and 98 \mathrm { SO } _ { 2 } lines to constrain our models for R Dor , we find an SO abundance of ( 6.7 \pm 0.9 ) \times 10 ^ { -6 } and an \mathrm { SO } _ { 2 } abundance of 5 \times 10 ^ { -6 } with both species having high abundances close to the star . We also modelled ^ { 34 } SO and found an abundance of ( 3.1 \pm 0.8 ) \times 10 ^ { -7 } , giving an ^ { 32 } SO/ ^ { 34 } SO ratio of 21.6 \pm 8.5 . We derive similar results for the circumstellar SO and \mathrm { SO } _ { 2 } abundances and their distributions for the low mass-loss rate object W Hya . For the higher mass-loss rate stars , we find shell-like SO distributions with peak abundances that decrease and peak abundance radii that increase with increasing mass-loss rate . The positions of the peak SO abundance agree very well with the photodissociation radii of \mathrm { H } _ { 2 } O . We also modelled \mathrm { SO } _ { 2 } in two higher mass-loss rate stars but our models for these were less conclusive . Conclusions : We conclude that for the low mass-loss rate stars , the circumstellar SO and \mathrm { SO } _ { 2 } abundances are much higher than predicted by chemical models of the extended stellar atmosphere . These two species may also account for all the available sulphur . For the higher mass-loss rate stars we find evidence that SO is most efficiently formed in the circumstellar envelope , most likely through the photodissociation of \mathrm { H } _ { 2 } O and the subsequent reaction between S and OH . The S-bearing parent molecule does not appear to be \mathrm { H } _ { 2 } S. The \mathrm { SO } _ { 2 } models for the higher mass-loss rate stars are less conclusive , but suggest an origin close to the star for this species . This is not consistent with current chemical models . The combined circumstellar SO and \mathrm { SO } _ { 2 } abundances are significantly lower than that of sulphur for these higher mass-loss rate objects .