The Monarchy cost £40 million a year however the Monarch surrenders the profit of the Crown Estates which was about £220 million.
So it cost the tax payer £-180 million.
The Crown Estates thing is a complete red herring. The Crown Estates are not her personal property, they are linked to her position as the head of state. If we were to rid ourselves of the monarchy, she wouldn't keep the money. They cost a hell of a lot more than that £40m when you factor in security costs.
Not even bringing the approximate £730 million brought in by tourists.
They come to see the buildings and visitor attractions, not the people. As I mentioned upthread, the Palace of Versailles remains a popular tourist attraction, even long after the French got shut of the monarchy. If the Queen no longer lived at Buckingham Palace it could stay open around the year rather than just for a few months.