There are many charts online that give you a length for your sword based on your length. But the truth is a bit more comlex. It is not your body size, but the size of your upperbody, length of your arms and width of your shoulders that need to be considered.
The best way to choose the correct length is to try with a sword. Perhaps you have a collegue in the dojo that will help you with that. Hold the katana in your left hand and push it from the saya (sheath) a bit with your left thumb. Pull out the sword with your right hand, with your left hand you push the saya back a bit. You should be able to do this without the sword point touching the saya. If you cannot, the sword is too long for you. If you can do this without pushing back the saya with your left hand, the sword is too short.
If you have no sword to do this, you can try another way, but this one is only accurate if you have average body proportions. Find a long stick and hold it in your right hand. Hold it next to your body, like a tennis racket pointing to the ground. Make sure that the end of the stick is about 5 cm above the ground. Hold the sword like this with your right hand and measure the length from tip to your hand. As said, this is less accurate and only works if you have average body proportions. So if your arms are longer than average for your height or your legs are shorter than average for your length, this way is less reliable.