If you are in the UK on a spousal visa, there is no limit to the number of days you can spend outside the UK.
What matters is:
- the UK is your primary residence throughout the visa validity
and
- you and your spouse/partner have lived TOGETHER for the entire length of your visa.
This can be living together inside the UK or outside the UK, though the majority of the time should be spent inside the UK. It is okay if you have to live apart for some of the visa length, but only if there is a very good reason for it, such as military deployment or being sent overseas with your UK company
However, there IS a 'days outside the UK' limit for applying for citizenship after gaining ILR (which takes 5 years from arriving on your spousal visa). If you are married to a UK citizen at the time you apply for citizenship, the limits are the following:
- you were physically inside the UK exactly 3 years prior to your citizenship application date
- you have not spent more than 270 days (9 months) outside the UK in the final 3 years before applying for citizenship
- no more than 90 of those days (3 months) can have been in the final 12 months before applying for citizenship
(when calculating days outside the UK, you don't count the day you left or the day you returned to the UK)