How to decide a text box length based on the text size?

If I have a fixed text width, let's say 35 characters, I know the font and font size, Arial Regular 13, how can I calculate the size of the text box required to fit in the text? Is there a formula or thumb-rule for the same?