Dunedin has a total area of 22.94 square miles. 10.4 square miles (27 km2) of it is land and 17.8 square miles (46 km2) of it (63.20%) is water. Dunedin is bordered by the city of Clearwater to the south and east, the Gulf of Mexico to the west, and by Palm Harbor (an unincorporated community of Pinellas County) to the north.