As with anything, safety is the number one priority when installing or replacing a ceiling fan. 9 times out of 10 when I come to a customers house to replace a ceiling fan the electrical box in the ceiling is not fan rated and must be replaced with a special electrical box rated specifically for ceiling fans. The cost to replace the box (supplied by me) and assemble and install a ceiling fan (provided by the customer) usually costs $249-$299