A bakery sold 2/3 of a cake in the morning and 1/2 of the remaining cake in the afternoon. What fraction of the whole cake was left at the end of the day?

The bakery sold a total of 2/3 + 1/2 = 4/6 + 3/6 = 7/6 of the cake.

This means that by the end of the day, there was 6/6 - 7/6 = <<6/6-7/6=1/6>>1/6 of the whole cake left. Answer: \boxed{\frac{1}{6}}.