Lua is free software: it can be used for both academic and commercial purposes at absolutely no cost. There are no royalties or GNU-like "copyleft" restrictions. Lua qualifies as Open Source software. Its licenses are compatible with GPL. Lua is not in the public domain and PUC-Rio keeps its copyright. The legal details are below.
License for Lua 5.0 and future versions:
Starting with Lua 5.0, Lua is licensed under the terms of the MIT license reproduced below.License for Lua 4.0 and previous versions:
Until Lua 4.0, Lua used its own license, which was very close to the zlib license and others, but not quite the same.
The spirit of both licenses
is that you are free to use Lua for any purpose at no cost without having to
ask us. The only requirement is that if you do use Lua, then you should give
us credit by including the appropriate copyright notice somewhere in your product
or its documentation. A nice, but optional, way to give us further credit is
to include a Lua logo in a web page for your product.
The Lua language is entirely designed and implemented by a team at PUC-Rio in Brazil. The implementation is not derived from licensed software.