The time it takes for a dead rat to stop smelling can vary depending on several factors, such as temperature, humidity, and the size of the rat. Generally, the odor from a dead rat can persist for several days to a few weeks. The decomposition process releases unpleasant odors that can be quite strong. Properly disposing of the dead rat as soon as possible and maintaining good ventilation in the affected area can help minimize the smell. If the odor persists or becomes unbearable, it may be necessary to seek professional assistance to locate and remove any remaining carcasses or address any underlying issues.