I'm not sure if the half+7 rule is appropriate for a marriage. I've usually heard it in the context of dating and intimate relationships.
Basically it says the age of the younger person in the relation should not be less than half the age of the older person plus seven years. So for example if you are 28 years the least you can go to date a person who is 14+7= 21 or older. If you are 40, you can date a person who is 20+7= 27 or older. And if you are 14, the condition fails as 7+7=14 and 14 is not less than 14. The condition fails and you cannot be in a relationship.
Whatever works. My mum and dad have an age gap of 12 years. I am 6 months younger than my husband. My sister is a year older than her fiance. Does the age affect the relationship dynamics? Not necessarily. What truly matters is the compatibility.