In short, no, there isn't a formula that Realtors use in order to calculate how much to offer for a home. How much you offer is really dependent on how you feel, how much you want the home.
Depending on the condition of the home, why it's being sold, how much you're in love with the home, your offer will vary. If you can tell that the house will require extensive termite repair or there is extensive cosmetic repairs that need to be done, you can take all that into consideration and lower your offer from that point. If you are working with a Realtor they will be able to best guide you as to how much you should offer to have some sort of shot at getting either an acceptance or at least a counteroffer. Their opinion is based more off experience than off a formula of sorts.
Either way it doesn't hurt to try! Good luck!