To convert a hexadecimal number to an octal number, you can first convert the hexadecimal number to a binary number, and then group the binary digits into groups of three, starting from the right-hand side, and convert each group to its octal equivalent.