It's hard to have an irregular period, I agree. You may just have a very long cycle for whatever reason. What you should do is start tracking it so you can keep count of the days and see if it is actually irregular in that it comes at different times or if it is actually a long cycle. Or maybe you already are. But looking to see how many days over the course of a few cycles is very helpful. I use My Cycles which is the MedHelp app and can be found in the above tool bar under health tools. Let me know if you need help finding it.
Anyway, you can talk to your doctor about reasons this happens. It could be hormonal such as too much estrogen production, it could be due to thyroid, it could just be your system regulating. They can take blood and get a better picture of things.
Some women/girls will take birth control pills to get regular. Sounds weird but this can be helpful. That's a decision between you and your doctor though.
If you have unprotected sex, you do need to test. And since you are irregular, it's EXTRA important to use birth control such as condoms every time. good luck