You should consult the Guide to Naturalization. As far as time requirements go, you need to:
a) have been a permanent resident for a certain number of years (depending on how exactly you apply),
b) have a certain number of months of continuous residence and
c) have a certain number of months of physical presence inside the US.
The guide explains how to determine whether you meet each of these requirements. The first requirement is easy to figure out because it just depends on when you got your green card. However, b) and c) depend on each trip you took outside the US and how long these trips lasted. One thing the guide says is that if you have been on a trip outside the country over 6 months but under a year, you can demonstrate that you did not intend to abandon your residency in the US. You demonstrate this by filing additional documentation showing that you still had ties to the US. Tax filings, mortgage, rent, utility bills, etc. can be used for this. Do read the guide. The details are on page 22-24 in my edition of the guide.