The City Sights tour company had the same ratio of tourists to guides on both days this weekend. On Saturday, there were 120 tourists and 18 guides. On Sunday, there were 40 tourists.

How many guides were there on Sunday?

The ratio of tourists to guides on Saturday was 120/18 = <<120/18=6.667>>6.667 tourists per guide.

Since the ratio of tourists to guides was the same on Sunday, there were 40/6.667 = <<40/6.667=6>>6 guides on Sunday. Answer: \boxed{6}.