You got it right !
You can use a use a tape measure to get the distance from the ports to the end of the card or use the specs of your case as they’re listed on most pc component websites, like I did.
You do have to know which case model you do have, though.