I want to tell my friend that he can stay at my house as long as he wants.
I was thinking:
泊まるのは何ヶ日でもいいです。
or
泊まりたい程泊まってもいいです。
What is the correct way?
Both of those work with a little fixing.
何日でも泊まってもいい
泊まりたいだけ泊まってもいい
or
好きなだけ泊まってもいい
Hell, throw it all together and you can sound like a super welcoming friend lol.
何日でも好きなだけ泊まってくれ!
To choose between the two sentences, the first one is much better by the native standards. However, 「何ヶ日」 sounds very awkward. 「[何日]{なんにち}」 is the correct word. You can also say 「[何ヶ月]{なんかげつ}」 if you guys are talking long-term, but not 「何ヶ日」, which is probably why I, a native speaker, do not know how to read it.
Your second sentence is incorrect because of the use of 「[程]{ほど}」. Replace it with 「だけ」 and you will have a correct sentence.