Method of calculating days outside the United States
It is important to correctly calculate the duration of trips outside the United States. It is especially true in cases where the total time spent outside the United States during the last five years approaches 913 days. Online date calculators designed to calculate the number of days between two dates may come to help. However, keep in mind that for naturalization application Form N-400 partial days spent in the United States count as whole days spent in the United States. Therefore, to get the right number of days outside the United States, you will have to subtract one day from the total of days between two dates.
source: https://www.avvo.com/legal-guides/ugc/calculator-of-days-outside-the-united-states-for-naturalization-application-form-n-400