iPhone location journals
UK statutory residence test day counter
Turn a Country Days CSV or typed stays into UK days under the midnight rule and see every step, in your browser. A count, not tax advice.
Count your UK midnight days by tax year
This is a count, not tax advice. It applies the day-based parts of the UK Statutory Residence Test (SRT) to the dates you give it and does not say whether you are UK tax resident. Missing dates make the count too low, and tests that depend on work and homes are not calculated. For the official check, use HMRC’s Tax Residence Indicator (the residence status checker) and ask an adviser. Read what this tool does not do.
Counting for the US instead? Use the substantial presence test calculator or the citizenship physical presence calculator. For other countries and windows, use the days-in-country calculator.
Load a Whereday Country Days CSV, add stays by hand, or both. The page works out where you were at the end of each day, counts UK midnight days for the tax year you pick (6 April to 5 April), and shows each step. No account, upload or analytics.
Choose a file, add a stay or load an example. The examples are synthetic: invented dates, not real people. Download them: leaver CSV, arriver CSV.
Rows that were not counted
| File line | Problem | Row text |
|---|
Your answers
Dates where the end-of-day country is not clear
These dates have two or more countries and the next date does not settle which one you were in at midnight. Pick one, or “In transit / none”. Until you do, they are not counted. Dates for this tax year and the two before it are listed.
Result
Load a file or add a stay to see the count.
Copy the summary
Show every date in this tax year
| Date | Countries present | End-of-day country | How it was decided |
|---|
What counts as a UK day: the midnight rule
For the SRT, a day counts as a day spent in the UK if you are present in the UK at the end of that day, which is midnight (Finance Act 2013, Sch. 45 para 22). Two things are left out even if you are in the UK at midnight, and both are marked by you in the tool:
- Transit. You arrive in the UK as a passenger that day, leave the next day and do nothing substantially unrelated to passing through.
- Exceptional circumstances. You would not otherwise be in the UK at the end of the day, because circumstances beyond your control prevent you leaving, and you intend to leave as soon as they allow. Para 22 gives national or local emergencies and sudden or life-threatening illness or injury as examples. No more than 60 days in a tax year can be left out this way; later days count as UK days.
Read the paragraph for the exact conditions before you mark a date. The tool cannot tell whether yours are met.
Two invented examples
- Arrival day. On 14 September 2025 a traveller lands in London at 20:00 and is still there at midnight. That date is a UK day. If they had only passed through and flown on the next day, it could be the transit case above.
- Departure day. On 20 June 2025 the same traveller is in the UK until 18:00, then flies to Spain and is there at midnight. A “days present” count counts 20 June as a UK day. The midnight rule does not. The tool calls it a qualifying day, which matters for the deeming rule.
That is why this result can differ from a “days present” count such as the one Whereday’s Country Days and the US test use. The 183-day rule explained compares them.
Travel days: how the end-of-day country is inferred
A Country Days CSV records which countries you were in on a date. It does not record where you were at midnight, so the tool applies a stated rule to each date:
- One country on the date: that country is the end-of-day country.
- Two or more countries: the end-of-day country is the one that also appears on the next date, if exactly one does. This is marked inferred.
- Anything else (no country on the next date matches, several match, or there is no next date): the date is unresolved. It is listed and you pick the end-of-day country, or “In transit / none”. A date you pick is marked picked by hand.
Every result shows how many dates were taken as one country, how many were inferred and how many you picked. Unresolved dates are not counted anywhere until you pick, and the page says so. The tool never assumes where you were at midnight. Note that a date with only one country is taken at face value even if you travelled that day, because the file holds nothing else.
How the SRT works, in order
HMRC’s guidance, RDR3, applies the tests in this order. The tool covers only the day-based parts.
1. Automatic overseas tests (RDR3 section 2)
- Test 1: UK resident in one or more of the 3 previous tax years and fewer than 16 days in the UK in the tax year.
- Test 2: UK resident in none of the previous 3 tax years and fewer than 46 days in the UK.
- Test 3 (full-time work overseas): not calculated. It depends on work, not days. See RFIG20100.
2. Automatic UK tests (RDR3 section 3)
- Test 1: 183 days or more in the UK in the tax year.
- Test 2 (only home) and test 3 (full-time work in the UK): not calculated. They depend on homes and work. See RFIG20300.
3. Sufficient ties (RDR3 section 4)
If no automatic test settles it, the number of UK ties you need depends on your days in the UK and on whether you were UK resident in one or more of the previous 3 tax years.
| Days in the UK in the tax year | Table A: resident in 1 or more of the previous 3 years | Table B: resident in none |
|---|---|---|
| 16 to 45 | At least 4 | Automatic overseas test 2 (fewer than 46) |
| 46 to 90 | At least 3 | All 4 |
| 91 to 120 | At least 2 | At least 3 |
| 121 to 182 | At least 1 | At least 2 |
| 183 or more | Automatic UK test 1 | |
Under 16 days in Table A is automatic overseas test 1. The tool shows “days left before the next band” for the tax year: the days you can add before the count reaches the next row.
The five ties
- 90-day tie (Sch. 45 para 37): more than 90 UK midnight days in either of the two previous tax years. The tool counts each year from your dates and shows both numbers. If the file does not cover a whole year, it says so and lets you type a number. Deemed days never count towards this tie.
- Country tie (Sch. 45 para 38): the UK is the country where you have the most end-of-day dates in the tax year, and a tie for the most counts too. It applies only if you were UK resident in one or more of the previous 3 tax years. The tool counts UK midnight days (after your marks) against the end-of-day dates in every other country. Unresolved dates are not counted, which can change the answer.
- Family, accommodation and work ties: you tick these, because dates cannot show them. HMRC defines them in RFIG20500 onward.
The deeming rule: qualifying days after the 30th
A qualifying day is a day on which you were in the UK at some point but not at the end of it. Under Sch. 45 para 23 the deeming rule applies only if you have at least 3 UK ties for the tax year, more than 30 qualifying days and were UK resident in at least one of the 3 previous tax years. When it applies, each qualifying day after the 30th, counting from 6 April, is treated as a day spent in the UK. Deemed days do not count towards the 90-day tie. HMRC explains it at RFIG20720.
The tool shows the midnight total and the total with deeming. It uses the second for the day tests only when the rule applies, and it uses the ties you have ticked and the ties it computed to decide that.
| UK midnight days | 100 |
|---|---|
| Qualifying days | 40 |
| Deemed days (40 − 30) | 10 |
| Days used for the tests | 110 |
With fewer than 3 ties, or if you were not resident in any of the 3 previous years, the same dates give 100 days.
Worked examples
Two invented people, both for the 2025–26 tax year (6 April 2025 to 5 April 2026). The tables are the calculator’s output; load the examples above to see the same figures, and a test checks every number.
A leaver (synthetic)
Resident in the UK in the previous years, moves to Spain in July 2025 and returns for two short visits. The file starts on 6 April 2024, so 2023–24 is not covered. They tick the accommodation tie only. Download the synthetic CSV.
| Step | Result |
|---|---|
| UK midnight days | 118 |
| Of those, inferred from the next date | 2 |
| Of those, picked by hand | 0 |
| Qualifying days | 3 |
| Deemed days added | 0 (3 is not more than 30) |
| Days used for the tests | 118 |
| UK midnight days 2024–25 | 365 |
| UK midnight days 2023–24 | 0 (not covered by the file) |
| Ties you have | 2: 90-day tie and accommodation tie |
| Ties needed (Table A, 91 to 120 days) | 2 |
| Days left before the next band | 2 (the next band starts at 121) |
| Day tests point to | Sufficient ties test met |
The country tie is not met: the UK has 118 end-of-day dates and Spain has 247.
An arriver (synthetic)
Not resident in any of the previous 3 years, lives in France, then spends the winter in the UK. The file starts on 6 April 2025, so the two previous years are not covered and nothing is typed. One date, 14 February 2026, has two countries and no record on the next date, so it is unresolved; the example picks the UK for it. They tick the family and accommodation ties. Download the synthetic CSV.
| Step | Result |
|---|---|
| UK midnight days | 102 |
| Of those, inferred from the next date | 1 |
| Of those, picked by hand | 1 |
| Qualifying days | 1 |
| Deemed days added | 0 (not resident in a previous year) |
| Days used for the tests | 102 |
| UK midnight days 2024–25 | 0 (not covered by the file) |
| UK midnight days 2023–24 | 0 (not covered by the file) |
| Ties you have | 2: family tie and accommodation tie |
| Ties needed (Table B, 91 to 120 days) | 3 |
| Days left before the next band | 18 (the next band starts at 121) |
| Day tests point to | Sufficient ties test not met |
Leave 14 February unpicked and the count is 101, with one unresolved date shown. Neither example says anything about the tests that are not calculated, which could change the answer.
What this tool does not do
- Split-year treatment. See RDR3, split years.
- Temporary non-residence. See RDR3, temporary non-residence.
- The work tests: automatic overseas test 3, automatic UK test 3 and the work tie’s day counts. It does not count work days. See RFIG20100 and RFIG20300.
- The only-home test (automatic UK test 2), in RFIG20300.
- Tax treaties and treaty tie-breakers. This tool does not look at them.
For the official check, use HMRC’s Tax Residence Indicator, the residence status checker linked from GOV.UK. It asks you to type in a day count, which this page can work out from your dates. Then ask a qualified adviser. This page makes no statement about any person’s tax residence.
Where your dates come from
Export Country Days from Whereday: open Timeline, then Country Days, choose All time and tap Export. The CSV has the columns country_code and local_date, and this page reads it with the same rules and row checks as the days-in-country calculator: bad rows are listed with their line numbers, and a repeated country and date counts once.
Viewing Country Days and adding manual stays are free. From version 1.8, new users keep exports after tracking access expires; existing free users keep their previous export-unlock requirement. How Whereday records country days covers travel days, time zones and adding a missing stay.
Recorded days only cover the time the app was recording, so gaps make the count too low; add missing stays by hand. A country-date CSV is a summary, not a backup of your visits and points, so keep a restorable copy too. Everything happens in your browser. This page blocks network connections and includes no analytics.
Questions
Does the day I arrive count?
Yes, if you are in the UK at midnight at the end of it, unless the transit or exceptional-circumstances rule in para 22 applies.
Does a layover count?
Only if you are in the UK at midnight. If you arrive as a passenger one day, leave the next and do nothing substantially unrelated to passing through, para 22 leaves the day out; mark it as transit.
What if I was in the air at midnight?
Then you were not present in the UK at the end of that day, so it is not a UK midnight day. In a Country Days CSV, such a date with two countries may be unresolved; pick “In transit / none” or the country you reached.
Is this the same as the US 183-day test?
No. The US substantial presence test counts any part of a day and weights three years; see the substantial presence test calculator. The UK count here is midnight days in one tax year. The 183-day rule explained compares them.
Does this tell me my tax residence?
No. It counts days and applies the day-based tests only. Work and home tests, split year, temporary non-residence and treaties can all change the answer. Use HMRC’s Tax Residence Indicator and an adviser.
Keep the dates behind your UK day count.
Whereday records the countries you’re in and keeps the dates on your iPhone, and you can export Country Days as CSV whenever you need a count.
Download free for iPhone