Assuming you are asking about a dishwasher that is going to be built in under an oven, the general rule of thumb is that it should be about 24 inches away from the oven. This allows enough space for doors to open and for people to move around easily when both appliances are in use. It also leaves enough room for ventilation so that heat and steam from the oven don't build up too much around the dishwasher.