Context : Isotopologue line intensity ratios of circumstellar molecules have been widely used to trace the photospheric elemental isotopic ratios of evolved stars . However , depending on the molecular species and the physical conditions of the environment , the isotopologue ratio in the circumstellar envelope ( CSE ) may deviate considerably from the stellar atmospheric value . Aims : In this paper , we aim to examine how the ^ { 12 } CO/ ^ { 13 } CO and H ^ { 12 } CN/H ^ { 13 } CN abundance ratios vary radially due to chemical reactions in the outflows of asymptotic giant branch ( AGB ) stars and the effect of excitation and optical depth on the resulting line intensity ratios . We study both carbon-rich ( C-type ) and oxygen-rich ( O-type ) CSEs . Methods : We performed chemical modeling to derive radial abundance distributions of our selected species in the CSEs over a wide range of mass-loss rates ( 10 ^ { -8 } < \dot { M } < 10 ^ { -4 } M _ { \odot } yr ^ { -1 } ) . We used these as input in a non-local thermodynamic equilibrium ( non-LTE ) radiative transfer code to derive the line intensities of several ground-state rotational transitions . We also test the influence of stellar parameters , physical conditions in the outflows , the intensity of the interstellar radiation field , and the importance of considering the chemical networks in our model results . Results : We quantified deviations from the atmospheric value for typical outflows . We find that the circumstellar value of ^ { 12 } CO/ ^ { 13 } CO can deviate from its atmospheric value by up to 25-94 \% and 6-60 \% for C- and O-type CSEs , respectively , in radial ranges that depend on the mass-loss rate . We show that variations of the intensity of the interstellar radiation field and the gas kinetic temperature can significantly influence the CO isotopologue abundance ratio in the outer CSEs of both C-type and O-type . On the contrary , the H ^ { 12 } CN/H ^ { 13 } CN abundance ratio is stable throughout the CSEs for all tested mass-loss rates . The radiative transfer modeling shows that the integrated line intensity ratio I _ { { } ^ { 12 } CO } / I _ { { } ^ { 13 } CO } of different rotational transitions varies significantly for stars with mass-loss rates in the range from 10 ^ { -7 } to 10 ^ { -6 } M _ { \odot } yr ^ { -1 } due to combined chemical and excitation effects . In contrast , the excitation conditions for the HCN isotopologues are the same for both isotopologues . Conclusions : We demonstrate the importance of using the isotopologue abundance profiles from detailed chemical models as inputs to radiative transfer models in the interpretation of isotopologue observations . Previous studies of circumstellar CO isotopologue ratios are based on multi-transition data for individual sources and it is difficult to estimate the errors in the reported values due to assumptions that are not entirely correct according to this study . If anything , previous studies may have overestimated the circumstellar ^ { 12 } CO/ ^ { 13 } CO abundance ratio . The use of the HCN molecule as a tracer of C isotope ratios is affected by fewer complicating problems , but we note that the corrections for high optical depths are very large in the case of high-mass-loss-rate C-type CSEs ; and in O-type CSEs the H ^ { 13 } CN lines may be too weak to detect .