The composition and structure of the upper atmospheres of extrasolar giant planets (EGPs) are affected by the high-energy spectrum of their host stars from soft X-rays to the extreme ultraviolet (EUV). This emission depends on the activity level of the star, which is primarily determined by its age. In this study, we focus upon EGPs orbiting K-and M-dwarf stars of different ages -Eridani, AD Leonis, AU Microscopii -and the Sun. X-ray and EUV (XUV) spectra for these stars are constructed using a coronal model. These spectra are used to drive both a thermospheric model and an ionospheric model, providing densities of neutral and ion species. Ionisation -as a result of stellar radiation deposition -is included through photo-ionisation and electron-impact processes. The former is calculated by solving the Lambert-Beer law, while the latter is calculated from a supra-thermal electron transport model. We find that EGP ionospheres at all orbital distances considered (0.1−1 AU) and around all stars selected are dominated by the long-lived H + ion. In addition, planets with upper atmospheres where H 2 is not substantially dissociated (at large orbital distances) have a layer in which H + 3 is the major ion at the base of the ionosphere. For fast-rotating planets, densities of short-lived H + 3 undergo significant diurnal variations, with the maximum value being driven by the stellar X-ray flux. In contrast, densities of longer-lived H + show very little day/night variability and the magnitude is driven by the level of stellar EUV flux. The H + 3 peak in EGPs with upper atmospheres where H 2 is dissociated (orbiting close to their star) under strong stellar illumination is pushed to altitudes below the homopause, where this ion is likely to be destroyed through reactions with heavy species (e.g. hydrocarbons, water). The inclusion of secondary ionisation processes produces significantly enhanced ion and electron densities at altitudes below the main EUV ionisation peak, as compared to models that do not include electron-impact ionisation. We estimate infrared emissions from H + 3 , and while, in an H/H 2 /He atmosphere, these are larger from planets orbiting close to more active stars, they still appear too low to be detected with current observatories.