dnd 5e – What does it cost to buy a tavern?

Waterdeep: Dragon Heist provides an option

Warning: possible spoilers of the adventure ahead.

In the Chapter 2 of Waterdeep:
Dragon Heist
, the “Open for Business?” section (page 41) explains how
the characters can reopen a closed tavern located in Trollskull Alley.
Since the building is already there, the cost for maintenance is 1000
gp, plus 250 gp paid upfront for the guild licenses and contracts.
There’s additional details involved, like the guilds you have to talk
to (Brewers Guild, Fellowship of Innkeepers, etc), but the cost to
open is 1250 gp.

After opening, you have to pay an additional 60 gp
every tenday for maintenance costs and guild expenses, and you have to
roll a d100 + 10 and consult the Running a Business table in chapter 6
of the Dungeon Master’s Guide to determine whether the tavern lost
money or earned profit.

Besides the option above, if you want to build one from the ground up, your best guideline is to use the building cost of a Guildhall or Trading Post, presented on page 128 of the Dungeon Master’s Guide. Pages 126-127 of the DMG also provide guidelines for the recurring expenses of an Inn (be it on rural roadside or within a town/city).

For additional help around taverns, the DMs Guild Adept supplement, Durnan’s Guide to Tavernkeeping provides extra options on how to build and maintain taverns, but this supplement is not official.