Hi,
Welcome to ehealthforum,
Irregular periods along with long gap between periods are associated with anovulatory cycles (menstrual cycles without periodic egg release from ovary). Other causes include: hormonal derangements, ovarian suppression, PCOS, thyroid hormone dysfunction, endometrial changes, etc. It is difficult to comment on the cause for the irregularity of periods without examining you and going ahead with further evaluation. The exact cause can only be made out after careful evaluation. You should consider visiting your doctor/gynecologist at the earliest for thorough examination and further evaluation to look for the underlying cause for the irregular periods that you describe. Treatment as appropriate (based on examination findings and investigations results) would be started to help you regulate periods.
Take care.