I haven't gotten my periods in 3 months. But not pregnant (no sex)?

Not ovulating. You are likely not ovulating regularly. Not releasing an egg each month can make your periods irregular. Although this is the most common cause, see your doctor and have your thyroid checked; this can also make your periods irregular.