How do you say free in japanese?
As in the context:
This book is free.
What's the word for 'free' here?
Im just starting Japanese, but I find wordreference an amazing resource for languages. It's way beyond a dictionary. It gives you alternate meanings, compound forms, idioms, etc. Very useful.
I recently learned this word on my exchange and it's 無料（むりょう） In the context of your sentacne you would use it like この本は無料です。（このほんはむりょうです。） Hope that helps!
I suspect that 無料 is a more prestigious choice. When the Duolingo site language is set to Japanese, it mentions how it's a "無料サービス".
You are right. 無料 is often used in formal conversation and official announcement, while ただ is usually used in informal conversation and casual text.
Apart from 無料（むりょう）、ただ(タダ),
One more common word that mean free - サービス (coming from English word service. Seems that Japanese people consider service as free stuff!)
- この本はサービスです (This book is free)
Also when you buy stuff and there is a complimentary item, it is called おまけ（御負け）
- この本はおまけです (This book is complimentary)
You can of course use the imported word フリー
- この本はフリーです (This book is free)