For Chapter 7, you cannot file a bankruptcy until 8 years have passed since the date of filing of your prior Chapter 7 bankruptcy. For Chapter 13, you must generally wait at least two to four years but there may be reason to consider Chapter 13 bankruptcy before 2-4 years.
Please note that these deadlines only apply if you received a bankruptcy discharge. So, if your case was dismissed, may be eligible to re-file immediately. Also, there are certain circumstances where it is possible to file a Chapter 7 and then a Chapter 13 in a short period of time.