I have seen people use formulas and I also have written for clients who ask for a percentage or keyword density. The latter would depend on the number of words in your post. If you have, say 500 words and you want a keyword density of 1%, you will have the keyword 5 times in that post. Most clients usually ask for between 1-3% keyword density. I'm guessing that if you go above that, you may be penalized or flagged for spamming those keywords. It's kind of weird though, because sometimes a keyword might naturally be used more than that in organic writing.