On the US side, this 183 day rule-of-thumb has a proper name called the Substantial Presence Test. It’s actually a little bit more convoluted than 183 days in a calendar year but as a rule-of-thumb just ask yourself “did I spend most of the tax year in the US?”.