Tax Residency Determination Aid
Based on common international principles (like physical presence and OECD model tie-breakers). Not definitive tax advice.
Country Information
Physical Presence Test (Commonly 183 days)
Tie-Breaker Questions (Based on OECD Model)
Answer these if potentially resident in both countries based on their domestic laws (often indicated if presence is substantial in both, e.g., >183 days or meeting other criteria).
Potential Residency Analysis
Important: This tool provides a simplified analysis based on common international principles and the information you provided. Tax residency rules are complex and vary significantly by country. This is NOT definitive legal or tax advice. Always consult a qualified tax professional in the relevant jurisdictions for accurate guidance.
Inputs Summary:
- `;
resultText += `
- Days in ${countryA}: ${daysInA} `; resultText += `
- Days in ${countryB}: ${daysInB}
Initial Assessment (Based on simplified 183-day presence):
- `;
resultText += `
- Potential resident in ${countryA} based on physical presence? ${residentInA_domestic ? 'Yes' : 'No'} `; resultText += `
- Potential resident in ${countryB} based on physical presence? ${residentInB_domestic ? 'Yes' : 'No'}
Potential residency in both ${countryA} and ${countryB} based on physical presence. Tie-breaker rules (based on common treaty principles) may apply.
`; tieBreakerSection.style.display = 'block'; tieBreakerNeeded = true; finalResidency = applyTieBreakers(countryA, countryB); // Apply tie-breakers } else if (residentInA_domestic) { finalResidency = countryA; resultText += `Potentially resident only in ${countryA} based on physical presence.
`; tieBreakerSection.style.display = 'none'; } else if (residentInB_domestic) { finalResidency = countryB; resultText += `Potentially resident only in ${countryB} based on physical presence.
`; tieBreakerSection.style.display = 'none'; } else { finalResidency = "Neither (based on this simplified test)"; resultText += `Potentially resident in neither ${countryA} nor ${countryB} based solely on the simplified 183-day physical presence test. Other tests might apply.
`; tieBreakerSection.style.display = 'none'; } // Add Tie-breaker results if they were applied if (tieBreakerNeeded) { const tieBreakerResultText = getTieBreakerResultText(finalResidency, countryA, countryB); resultText += tieBreakerResultText; } resultText += `Overall Potential Residency Outcome (Illustrative):
`; if (finalResidency.startsWith('Likely')) { resultText += `Based on the simplified analysis and common principles, residency is ${finalResidency}.
`; } else if (finalResidency === "Mutual Agreement Needed" || finalResidency === "Tie-Breaker Inconclusive") { resultText += `The tie-breaker analysis was inconclusive based on the provided information. Residency might be determined by mutual agreement between the countries' tax authorities.
`; } else { resultText += `Based on the simplified analysis, potential residency appears to be in: ${finalResidency}.
`; } analysisContent.innerHTML = resultText; resultsDiv.style.display = 'block'; } function getSelectedRadioValue(name) { const radios = document.getElementsByName(name); for (let i = 0; i < radios.length; i++) { if (radios[i].checked) { return radios[i].value; } } return null; // Or a default/error value } function applyTieBreakers(countryA, countryB) { const permanentHome = getSelectedRadioValue('permanentHome'); const vitalInterests = getSelectedRadioValue('vitalInterests'); const habitualAbode = getSelectedRadioValue('habitualAbode'); const nationality = getSelectedRadioValue('nationality'); // Store inputs for PDF window.tieBreakerInputs = { permanentHome, vitalInterests, habitualAbode, nationality }; // 1. Permanent Home if (permanentHome === 'A') return `Likely ${countryA} (Permanent Home)`; if (permanentHome === 'B') return `Likely ${countryB} (Permanent Home)`; // 2. Center of Vital Interests (only if home is in both or neither) if (permanentHome === 'Both' || permanentHome === 'Neither') { if (vitalInterests === 'A') return `Likely ${countryA} (Center of Vital Interests)`; if (vitalInterests === 'B') return `Likely ${countryB} (Center of Vital Interests)`; } // 3. Habitual Abode (only if vital interests are unclear or home is in both/neither) if ((permanentHome === 'Both' || permanentHome === 'Neither') && vitalInterests === 'Unclear') { if (habitualAbode === 'A') return `Likely ${countryA} (Habitual Abode)`; if (habitualAbode === 'B') return `Likely ${countryB} (Habitual Abode)`; } // 4. Nationality (only if habitual abode is also indeterminate) if ((permanentHome === 'Both' || permanentHome === 'Neither') && vitalInterests === 'Unclear' && habitualAbode === 'Neither') { if (nationality === 'A') return `Likely ${countryA} (Nationality)`; if (nationality === 'B') return `Likely ${countryB} (Nationality)`; if (nationality === 'Both' || nationality === 'Neither') return "Mutual Agreement Needed"; // Or further steps not covered here } return "Tie-Breaker Inconclusive"; // If logic doesn't resolve } function getTieBreakerResultText(finalResidency, countryA, countryB) { let text = "Tie-Breaker Analysis (Simplified OECD Model):
- ";
const inputs = window.tieBreakerInputs || {}; // Retrieve stored inputs
text += `
- Permanent Home available in: ${inputs.permanentHome === 'A' ? countryA : inputs.permanentHome === 'B' ? countryB : inputs.permanentHome || 'Not specified'} `; if (finalResidency.includes('(Permanent Home)')) { text += `
- Decision based on Permanent Home.
(.*?)<\/strong><\/p>/gi, '\n--- $1 ---\n') // Section titles
.replace(/ (.*?)<\/p>/gi, '$1\n')
.replace(//gi, '')
.replace(/<\/ul>/gi, '')
.replace(/
/gi, '\n------------------------------------\n')
.replace(/
/gi, '\n')
.replace(/ /g, ' ')
.replace(/(\n\s*){2,}/g, '\n\n') // Consolidate multiple newlines
.trim();
// 2. Input Summary Section
doc.setFontSize(14);
doc.setTextColor(sectionBgColor); // Use section color for title
yPos = addWrappedText("Input Summary", leftMargin, yPos, {});
yPos += 2; // Small gap
doc.setDrawColor(sectionBgColor);
doc.line(leftMargin, yPos, rightMargin, yPos); // Separator line
yPos += lineSpacing;
doc.setFontSize(11);
doc.setTextColor(textColor);
let inputSummary = `Country A: ${countryA}\nCountry B: ${countryB}\nDays in ${countryA}: ${daysInA}\nDays in ${countryB}: ${daysInB}`;
yPos = addWrappedText(inputSummary, leftMargin, yPos, {});
yPos += sectionSpacing;
// 3. Analysis Section
doc.setFontSize(14);
doc.setTextColor(sectionBgColor);
yPos = addWrappedText("Potential Residency Analysis", leftMargin, yPos, {});
yPos += 2;
doc.setDrawColor(sectionBgColor);
doc.line(leftMargin, yPos, rightMargin, yPos); // Separator line
yPos += lineSpacing;
doc.setFontSize(11);
doc.setTextColor(textColor);
// Add the extracted analysis text
yPos = addWrappedText(analysisText, leftMargin, yPos, {});
yPos += sectionSpacing;
// 4. Important Note Section
doc.setFontSize(11);
doc.setTextColor(accentColor); // Use accent color for the note title
yPos = addWrappedText("Important Note:", leftMargin, yPos, {});
yPos += 2;
doc.setTextColor(textColor); // Regular text color for the note body
const noteText = "This tool provides a simplified analysis based on common international principles and the information provided. Tax residency rules are complex and vary significantly by country. This is NOT definitive legal or tax advice. Always consult a qualified tax professional in the relevant jurisdictions for accurate guidance.";
yPos = addWrappedText(noteText, leftMargin, yPos, { FontStyle: 'italic' }); // Italicize note
// --- Save PDF ---
doc.save(`Tax_Residency_Aid_${countryA}_${countryB}.pdf`);
}
The Tax Residency Determination Aid is an essential tool designed to help individuals, expatriates, and tax professionals determine tax residency status accurately. Tax residency affects how and where you are taxed and influences your filing requirements, deductions, and tax treaty benefits.
This aid guides you through key residency tests such as the substantial presence test, domicile rules, and statutory residency criteria used by various countries. By entering relevant information about your time spent in different jurisdictions, ties to countries, and other factors, you can clarify your residency status.
Understanding your tax residency is crucial for compliance with local tax laws and avoiding double taxation. It also helps in planning your finances, investments, and international income reporting. The tool highlights common residency scenarios and explains how tax treaties may impact your status.
The Tax Residency Determination Aid simplifies complex rules into an easy-to-follow process, making it accessible for individuals and professionals alike. It supports informed decision-making related to international moves, work assignments, and cross-border financial activities.
Whether you are an expat, remote worker, or tax advisor, this tool provides reliable insights to manage your tax residency confidently and accurately.
Start using the Tax Residency Determination Aid today to clarify your tax residency and ensure compliance with applicable tax laws.
