@Travelling *******
You can stay a year if you extend your stay.
You can also just go outside the country for a day or so, and then return to get stamped in for another 6 months.
You are a tax resident if you stay more than 180 days during a calendar year.
A lot of countries have a tax agreement with Thailand that prevents dual taxation. I chose to pay tax in Thailand because it is beneficial for me.