I don't think the accepted answer is correct. While the TOTAL length of a SOQL query must be less than 20,000 characters, the WHERE clause can only be 4,000 characters. And the IN clause is part of that 4,000 characters.
Therefore, the actual maximum length of the IN clause is less than 4,000 characters (because the field name and the string ' IN ' contribute to the 4,000 characters.
https://developer.salesforce.com/docs/atlas.en-us.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_cheatsheet/salesforce_app_limits_platform_soslsoql.htm
Edit:
The maximum length has been extended to 100,000 characters. But the IN clause is still less than that because the list of fields takes up some of those 100,000 characters.
As for the number of items allowed in the IN clause collection, that is determined by the total character count as well.