The answer to this is pretty straight forward. Look up what you are allowed to earn monthly. Then simply don't earn more than that in any given month. Do that and you'll be fine. What you need to pay your bills has nothing to do with what you need to calculate. My friend dId that and lost her SSDI. Don't foolishly think, "But I need to earn more!" Earn what they allow you to earn.
I just found a link for you, but I don't know how to copy it on my new phone. The amount I found is $1180 per month. (It generally goes up every few years.)
My source: DisabilitySecrets.com