The two conditions
You meet the test for a calendar year if you were in the United States on at least 31 days that year, and on 183 days or more over three years counting all days this year, one third of the days last year and one sixth of the days the year before.
Days that do not count
Some days are excluded, including days as an exempt individual (for example certain students and teachers), days in transit between two foreign points of under 24 hours, and days you could not leave because of a medical condition that arose in the US.
The closer connection exception
If you were in the US for fewer than 183 days this year, kept a tax home in another country and had a closer connection to it, you may be able to avoid US residence by filing Form 8840.
Questions
Does a partial day count?
Yes. Any part of a day in the US counts as a day, with limited exceptions.
Is it 183 days in one year?
Not exactly: it is 183 weighted days over three years, and only if you had at least 31 days this year.
Sources
Staymark counts days against published rules. This guide is general information, not legal, tax or immigration advice; rules change, so check the official sources above before you travel.