Nicely put Megabite, although I do have to disagree about age not mattering. It does. If a 40 year old, was to marry a 20 year old of the same level of maturity at the time, the 20 year old would more than likely grow well past the 40 year old's level of maturity in the next few years. I have seen this happen many times.
It also matters greatly if the ages are those of an adult or a child. Its tragic to see children being forced into marriage with old men, (or any age man) as is the practice in some countries.
Experience also matters, and I would say a lot more than actual chonological age, when you are talking about adults. Levels of experience can vary greatly. The level of education of people who are would be partners, is also very important.
As you say, there are sooooo many variables, and where two consenting adults are concerned, nobody's business but theirs.