How much does the British royal family cost?

Meghan Markle and Prince Harry have quit, and Prince Andrew has courted controversy, but the British royals remain one of the richest royal families in the world. They cost UK taxpayers about 300 million pounds every year, but it's argued they bring in far more through tourism and business. So are they value for the money?