See:

Simplified: https://www.dailymail.co.uk/femail/article-174396/Do-women-prefer-taller-man.html

Academic: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1691293/pdf/12713744.pdf

Tallies quite well with the world wide M/F height ratios listed in: https://en.wikipedia.org/wiki/List_of_average_human_height_worldwide

So in the UK the average female height is 164cm
=> preferred male height = 164 * 1.09 = 178.76cm

So for example - a man of 170cm would need to lengthen by about 9cm.  The paper seems to imply that this would be the sweet spot so going over may not be that useful for finding a partner.

For females - divide the average male height by 1.09 to find your ideal height