Under federal law to help renters in your situation (it's calld the "Saving our homes act" or something similar), if you do not have a written lease or have a written month to month lease, you required to leave in 90 days.
If you have a written lease for a defined term (e.g. a one-year lease), then if the home is bought as an investment property, you get the longer of 90 days or the remaining lease term. If the home is bought by someone who intends to live there, you get 90 days.
The buyer can, of course, agree to give you more time or to keep renting to you.
The Answer(s) provided above are for general information only. The attorney providing the answer was not serving as the attorney for the person submitting the question or in any attorney-client relationship with such person. Laws may vary from state to state, and sometimes change. Tiny variations in the facts, or a fact not set forth in a question, often can change a legal outcome or an attorney's conclusion. Although AttorneyPages.com has verified the attorney was admitted to practice law in at least one jurisdiction, he or she may not be authorized to practice law in the jurisdiction referred to in the question, nor is he or she necessarily experienced in the area of the law involved. Unlike the information in the Answer(s) above, upon which you should NOT rely, for personal advice you can rely upon we suggest you go to AttorneyPages.com
and retain an attorney to represent you.