Working Remotely for another company in another country

Hello, I am a software engineer and I plan to move to Spain from another EU country. I might work there locally for a year or so but then I would like to work for a better paying country like Germany or Switzerland remotely since Spanish salaries are meh. How is it done exactly? Do I need to apply for some sort of self employed or freelance status for me to accept an offer from Germany? What kind of taxes do I pay and how do I avoid double taxation. 
Anyone working remotely?
Hi mad engineer, 

I'm looking into this as well, what nationality are you?  

I'm British so now treated as a 3rd world citizen (thanks Brexit!) so it's made things much more complex but not impossible - I have seen people posting about the 5 year non-lucrative visa, but you have to provide proof that you have around 27,000 euros of funds in the 1st year to support yourself.. it's complex but worth looking into.  

Spain are also rumoured to be publishing a new "digital nomad visa" for people who can work and live in Spain for up to 1 year and re-new for up to another 2 years. The exact details haven't been published yet, I think they are due in September but you can google it to find out more.  

Also, look for the "Digital Nomad Embassy" on facebook, they have lots of information about all of the countries that already have the nomad visas, there are other sites too so you can start to build up a network before you travel.  

Good luck!  
I am from Lithuania so I don't have much trouble moving to Spain.
Greetings @MadEngineerLT and welcome to the expat.com forum!

As you are from Lithuania you are an EU citizen, so you can move to any EU country, whether to work, study, or hang out on the beach. This is the EU's "freedom of movement".

Even so, there are some immigration formalities as the EU asks you to register in your new country. It's usually not difficult, and typically involves providing (for your new country) proof of address, proof of health insurance, and proof of funds/income.

Given this, it's no problem to move to any EU country... and it's no problem to work for any EU employer, whether you work in person or remotely. A German employer might want to verify your EU citizenship (i.e. your right to work) rather than your autonomo status in Spain. However, some might be concerned that you are paying tax on your income, so they could ask about your tax status, or require that you invoice them from a limited company (for which you'd have to file accounts).

Normally double taxation is not an issue.

Tax residence has different rules, but the most common/standard is the "substantial presence test" of 183 days or more (i.e. more than half the year). There might be some exit conditions on your current tax residence country, but I doubt this is an issue in Lithuania.

This means that a simple way of enjoying Europe is to keep your home/tax base in Lithuania, and then keep your physical stays in Spain, Germany or Bulgaria to less than than the 183 days. Or you can transfer it (and yourself) to Spain, or even Bulgaria (because of the low tax rates).

You can typically be an employee, or self-employed (autonomo in Spain), or utilize your own consulting company. You don't need multiple companies, it can be incorporated (and VAT registered, if you make a lot of money) in Lithuania, or Spain, or Ireland, or Bulgaria. Ireland and Bulgaria have very favourable corporate taxes. Not exactly freedom of movement, I think it's called freedom of establishment and freedom to provide services (but it has the same effect, just for companies and trade, rather than people.)

If you love Spain and you want to live in Spain, probably the least hassle is to register as a Spanish autonomo, or incorporate a Spanish company. And pay tax on Spain or your income whether from work in Spain, or work in Germany.

If you are a high-flying tech wizard, and you will make lots of money, and you just want to experience different places, and minimize your tax burden, then Bulgarian (or Ireland) residence, coupled with a Bulgarian (or Irish) limited company would help you do this. As long as you keep your stays in other EU countries below the 183 days.

Opinions differ about self-employed vs. company, and depends on level of income and the country's tax rules. But many folks like a company because it's more portable than self-employment, and you can include a lot of expenses (maybe car, maybe travel, maybe hardware,  maybe internet/mobile plan, maybe salary, maybe pension contributions, maybe website/marketing, etc. etc.) which are applied against your invoiced income, and hence lower your profits/tax bill.

In my case, I have legal residence in Bulgaria, Cyprus and Spain. But my tax base is in Bulgaria and my stays in the other two (and UK) are typically less than 90 days (but up to 182 would be OK too). I suppose if pushed I would admit that I liked Spain and Cyprus better than Bulgaria, there's a lot to like about warm, beachy Mediterranean cities. But I ended up spending most of my time in Bulgaria, and I really like it a lot!

It has exceptional connectivity (100 Mbps fibre in my city apartment and my country house for less than 10 euros per month, 50 GB data card for my MiFi for about 15 euros), and it has a very low cost of living (e.g. 1 euro coffee, 3 euros water bill, 25 euros electricity bill, 5 euro apartment maintenance bill, 60 euros property tax), and very low taxation (10% flat rate). And good travel connections (Sofia to European capitals via Ryanair and Wizzair). All this makes it great for remote working with in-person visits to schmooze the boss, or spend a few weeks on a beach. It's also pretty, safe, and not very crowded. I suppose the bottom-line is that my bills are low, and income tax is low, so I need to work only a few hours a month to breakeven... and that's a pretty stress-free situation to be in. And leaves me more time to go mountain biking in the Balkan Mountains or work on my doctoral thesis... or, disappointingly, watch far too much Netflix. :-)

If I reflect on my past lives in London, Singapore and San Francisco... well, it's great to live in these upscale, cosmopolitan cities. But I always rather felt like I was on a large treadmill running to keep up, as even a full-time tech salary didn't leave much over given the very high cost of living.

@gwynj That's quite interesting. How does legal residence work if you can have it in so many places? So if I would say move to Bulgaria for 6 months I would be tax resident there and I can then live somewhere else again as long as I return? What happens when you lose tax residence because you don't wanna come back there. How do you exactly achieve status of living in Spain and paying Bulgarian taxes? 

There are issues of legal residence (having a residence permit), physical residence (where you are/live/have a home), and tax residence (where you currently have the legal obligation to pay taxes).

Most us enjoy a simple life, so we usually have them all in the same place at the same time! :-) But, actually, they are separate and distinct.

Tax residence can be triggered by your assets or family or other rules, depending on the particular country. A few (but most don't) consider you a tax resident simply if you become legally resident (I think Serbia is an example). One (the USA) considers you a tax resident based on your (US) citizenship (or Green Card permanent residence), regardless of where you live. But the most typical one is the 183 days "substantial presence test". Hence, if you stay below this magic number, you are usually OK. (The other common one is your "centre of economic activity" which would be the country where most of your wealth is concentrated in terms of property, businesses, and other assets.)

If you stay longer (in one or more visits), then usually the country in question will consider you tax resident and want to see your tax return every year... whether you say anything to them or not.

You can move your tax residence multiple times, if you live in Lithuania for many years... then a year or two in Spain... then a year in Bulgaria... and so on. Or you can keep it in Lithuania, and keep your stays in the other countries below 182 days. Or you can relocate it to Bulgaria (if you think it has a lower tax rate), and then keep your stays in the other countries below the magic number.

However, you should note that once you have the tax residence in Lithuania or Bulgaria, you don't need to keep spending more than 183 days there, you just need to make sure your legal residence is in order, and that you file the appropriate tax returns every year. And that you keep below 182 days in any other countries. (In other words, the rules for acquiring tax residence status can be different from the rules for keeping it.)

Usually it's not terribly complicated to lose tax residence status in a country. You just move to another one, and stay there for more than 6 months. Sometimes it's more complicated than this, but for most of us that's how it would work. And usually it's no great drama: you live in Lithuania for 20 plus years and pay taxes there... then relocate to Bulgaria for a couple of years, and pay taxes there... then you get a great job in Germany for a few years and pay taxes there instead.

It's also possible to be tax resident in 2 or more countries, but it's not so common (unless you're American). Or, slightly more common is to be tax resident in one country, but have non-resident tax obligations in one or more other countries (typically because you have property or a business there, or citizenship there in the case of USA, or do some work there and get paid in that country). So, while I am not tax resident in either Cyprus or Spain, they do levy taxes on the property I own there.

As previously mentioned, in relation to your work, you can choose to make that a personal tax obligation (by being self-employed) or a corporate one (by incorporating a company). Although, of course, most likely having a company will create some personal tax obligations too, as you'd probably be an employee, or you'd want to issue yourself some dividends. Your personal tax residence doesn't have to be the same as your corporation's tax residence (which is its country of incorporation), and often isn't. However, if you choose to incorporate in a lower tax country (such as Bulgaria) it might be advantageous to also have your tax residence there too.

The sneaky thing that some folks do is to incorporate in Bulgaria (for low corporate tax) and use that for invoicing and doing business in a high tax country (such as Germany or France or Spain)... while ALSO continuing to live in that high tax country. That's a no-no.

You achieve the status of "living in Spain" by moving to Spain, and doing your EU citizen registration. If you want to live there all the time, you'll also be a Spanish tax resident. In which case, not advisable to try paying your taxes in Bulgaria. :-) I also have the status of "living in Spain", but I make sure it's for less than 183 days per year. Hence, I can continue to also be "living in Bulgaria" and being tax resident in Bulgaria.
@gwynj How do they actually calculate how many days you have stayed in particular country, because I definitely would like to spend more than 6 months in Spain just Spanish taxes are not that friendly. I think if I am correct you end up paying about same amount of taxes as you would doing a normal job.
Aso as far I understand if I wanted to buy a flat in Spain, then I would become tax resident there? Because I need to get that residence number or whatever.
If you love Spain, and you want to live there (and many do, it's super country!), then you'll be living there all or most of the year... which is more than 183 days. Hence you'll be a Spanish tax resident, and you'll need to file your tax returns there. If that's the case, the easiest option is to register as an "autonomo" (self-employed). Or, if you prefer, you can work for someone as an employee, or incorporate your own company in Spain.

Perhaps Spain tax rates are "not that friendly", but that's the trade-off for all the sun, sand, sea, and paella that we all know and love. :-) If you're not happy with this trade-off, then you have to become a tax resident of a more friendly country (or stay tax resident in Lithuania), pay your taxes there, and keep your Spanish stays below the 183 days. It's pretty much an either-or type deal.

(Although, of course, some digital nomads, and Perpetual Tourists - PTs, choose a third option: they skate through life with no official tax base, and no residence permits by staying below the 90 days visa-free allowance of most countries for EU citizens.)

Getting your residence permit (or registering as an EU citizen, in your case) doesn't automatically make you a tax resident of Spain. Neither does buying a flat in Spain. To buy a flat, you'll need to get your NIE (Número de Identidad de Extranjero) first. The NIE is just an ID number, and getting one also does not make you tax resident. (But the same NIE number will appear on your residence documents, and it will be used for social security and tax.)

I got myself a NIE, and I purchased an apartment in Spain. And I've done the EU citizen registration (as this was pre-Brexit). And I've registered at the local town hall (for the padron certificate, which immigration wanted to see). So I have legal residence, and I have a home there. But as I only spend a few weeks a year there, I'm not tax resident there. As such, I'm like most foreigners who have a holiday home in Spain.

Spain (and other countries) don't typically count your days and then remind you it's time to pay your taxes. :-) As you're an EU citizen they probably won't even bother to stamp your passport when you enter/leave, so you won't even be able to take quick peek at your passport and figure it out. It's your responsibility to be aware of where you spend your life, and where your tax-paying obligations are.
New topic