Does open source software contribute to GDP? Does open source software contribute to the GDP of a nation? If yes then how, and how does it depend on the increase in usage? For instance, would an increase in the usage of open source software increase GDP, or would it decrease GDP?
Open source software does influence GDP in a number of ways, both positively and negatively.  The net effect of greater open source usage will depend on the economy, I think particularly on whether the economy produces or imports most of the closed-source software that is being displaced by greater open-source usage.

Here are some of the mechanisms by which open source software influences GDP:


People still pay for some open source software through donations, a mechanism very similar to the purchase price of closed source software.  E.g. the Mozilla Foundation received $4.5 million in contributions in 2015 (see p4).
Companies provide a wide range of services that rely on open source software.  In some cases this is closer to closed source development (e.g. Red Hat), where companies pay to use software systems -- even though the underlying software is open source, they pay for an "enterprise solution".  Maybe 90% of web servers are open source, but companies are still paid to provide those servers, same with companies providing virtual machines.
The use of open-source software by companies or workers that could not afford closed-source equivalents improves productivity and probably therefore GDP.
Most obviously, the use of open source software replaces some closed-source software reducing the purchase and production of closed-source software.  More closed-source development is paid, so this would reduce GDP in the country where the closed-source software is made.


As I mentioned, whether an increase in open-source usage is likely to increase GDP probably depends primarily on whether most closed-source software is domestically produced or imported.  If closed-source software is domestically produced, and this production is partly replaced, GDP could go down, unless this if offset by open-source-related services.  However, if closed-source software is mostly imported (the case in the vast majority of countries worldwide), only the value addition in wholesale and retail shows up in GDP.  Using open source instead will free up foreign exchange that can be used elsewhere.  If a chunk of this buys capital goods instead, that should boost GDP in the medium term.