Isotopic ratios are a powerful tool for gaining insights into stellar evolution and nucleosynthesis. The isotopic ratios of the key elements carbon and oxygen are perfectly suited to investigate the pristine composition of red giants, the conditions in their interiors, and the mixing in their extended atmospheres. Of course the dust ejected from red giants in their final evolution also contains isotopically tagged material. This red giant dust is present in the solar system as presolar dust grains. We have measured isotopic ratios of carbon and oxygen in spectra from a large sample of AGB stars including both Miras and semiregular variables. We show how the derived ratios compare with expectations from stellar models and with measurements in presolar grains. Comparison of isotopes that are affected by different types of nucleosynthesis provides insights into galactic evolution.