Is there any specific algorithm relationship between Letter spacing and font size in InDesign?

ABCD Name
AD Name
ABD Name
I need to align the three above.
Some people may use grids, but that feature is difficult to use and I usually don't use it. It's better to use font spacing.
However, it is troublesome to adjust the font spacing. For example, when the font size becomes larger, I have to try every Letter spacing value.
Just want to ask: What is the relationship between font size and spacing, can we calculate it?

