Does staying under the day limit mean I pay no tax there?
Not by itself. The presence test people call the 183-day rule is one condition in a treaty's employment article, and the exemption in that article applies only where every condition in it is met. The others usually concern who pays the remuneration and whether the cost is borne by an establishment in the country where the work is done. Fail any one of them and the exemption is gone, however short the visit was. The day count is simply the condition that is easiest to state, which is how it came to be used as shorthand for the whole article.
How are days counted under the 183-day rule?
However the treaty in front of you says they are counted. That is not evasion of the question: the measuring period and the basis of counting are written into each individual article, and they differ between treaties. Some measure over a calendar year, some over the other country's own tax year, and some over a rolling window the article defines for itself, beginning or ending in the year concerned. A rolling window can catch a pattern of travel that a calendar year would not. Read the article that applies to your two countries before counting anything, because a count made on the wrong basis gives a confident wrong answer.
Is the 183-day rule the same in every tax treaty?
No, and treating it as a single rule is the usual source of error. Each treaty has its own employment article, negotiated separately, and the wording of the presence test is one of the things that varies. Two treaties can express the threshold differently, measure it over different periods, and attach different conditions around it. An employee working across three countries may be subject to three different tests at once on the same set of travel. The safe habit is to read the applicable article each time rather than carrying an answer over from the last country you looked at.
Do weekends and days off spent in the country count?
Where the article refers to days of presence, a day spent in the country is a day spent in the country, whether or not any work was done on it. That catches the weekend between two working weeks, the day of arrival and the day of departure, and the short holiday added to the end of a business trip. Some articles are drafted around days of presence and others around days on which employment is exercised there, and the difference changes the answer on exactly those days. Check the wording before assuming that non-working days are free.
My employer has no office in the other country, am I exempt?
That is one of the conditions rather than the whole of it. The employment article typically asks whether the remuneration is paid by, or on behalf of, an employer resident in the other country, and whether it is borne by a permanent establishment the employer has there. A recharge of your salary cost to the entity whose work you are doing can satisfy that condition in substance, even where no office exists on paper. Look at how the cost actually moves between the group companies, and not only at whose name is on the contract of employment.
Does the day count decide whether I am resident there?
No, and the two questions are worth keeping firmly apart. Residence is decided first, under each country's own domestic law, and then by the treaty's tie-breaker where both countries claim you. The presence test in the employment article does something narrower: it allocates the taxing right over employment income for a person who is not resident in the country where the work is performed. A short visit can therefore leave you plainly non-resident and still taxable there on the days worked, if the other conditions in the article are not met.
When does my Canadian tax residency actually end?
On the day your residential ties are severed, which is a question of fact rather than of the date on the boarding pass. The CRA weighs the significant ties first — a dwelling available to you, a spouse or common-law partner, and dependants in Canada — then secondary ties such as licences, memberships, accounts and provincial coverage. Keeping a home available while your family stays is the pattern that most often means residency never ended at all. See departure tax on leaving Canada.
What counts as foreign income, and what is a foreign tax?
Foreign income is income sourced outside the country you are filing in — where the work was done, where the property sits, where the payer is resident, depending on the type. A foreign tax, for credit purposes, is a levy imposed by another country that functions as an income tax and that you were legally required to pay. Consumption taxes, property taxes and most social contributions are not, however real the cost. Sourcing is decided by rule, not by which bank received it. See the foreign tax credit.