WordPress is an open source software. It is free in the sense of freedom not in the sense of free beer. You may ask what is the difference between these two? Open Source software comes with freedom for you to use, modify, build upon, and redistribute the software in any way you like. However, there might be costs involved somewhere.