
David A. answered 04/17/20
Practicing statistician with extensive SPSS experience 30+ years
While there is no surefire way to compute the mean, any method you use will require some recoding. Your first step should be to decide how you would like to handle the value of a given range. The most common method for the ranges with beginning and end points is to take the middle value (e.g. 23 for the 18-27 year olds, given that they could be anywhere up to almost 28 years old). Use "RECODE INTO DIFFERENT VARIABLES" to code the text "18-27 years old" to the number 23, and so forth. There is no perfect solution about how to handle the "58 and up" range and partly your method depends on what you need the answer for. My recommendation, in the absence of context, would be to code it as 63 -- that is, 5 above the minimum of the range, which is what you will be doing for each of the other ranges. However, arguments could be made for many other values. One question is whether it is more important to avoid overestimates, or underestimates, and another is what you know about the underlying population -- are there likely to be many people over the age of 68 in your sample?
Once you have the new variable coded, it will be straightforward to compute the average or any other statistics you need.