The Commonwealth Naval Forces were established on 1 March 1901, two months after the federation of Australia, when the naval forces of the separate Australian colonies were amalgamated. A period of uncertainty followed as the policy makers sought to determine the newly established force's requirements and purpose, with the debate focusing upon whether Australia's naval force would be structured mainly for local defence or whether it would be designed to serve as a fleet unit within a larger imperial force, controlled centrally by the British Admiralty. In 1908–09, the decision was made to pursue a compromise solution, and the Australian government agreed to establish a force that would be used for local defence but which would be capable of forming a fleet unit within the imperial naval strategy, albeit without central control. As a result, the navy's force structure was set at "one battlecruiser, three light cruisers, six destroyers and three submarines".
On 10 July 1911, King George V granted the service the title of "Royal Australian Navy". The first of the RAN's new vessels, the destroyer Yarra, was completed in September 1910 and by the outbreak of the First World War the majority of the RAN's planned new fleet had been realised. The Australian Squadron was placed under control of the British Admiralty, and initially it was tasked with capturing many of Germany's South Pacific colonies and protecting Australian shipping from the German East Asia Squadron. Later in the war, most of the RAN's major ships operated as part of Royal Navy forces in the Mediterranean and North Seas, and then later in the Adriatic, and then the Black Sea following the surrender of the Ottoman Empire.
In 1919, the RAN received a force of six destroyers, three sloops and six submarines from the Royal Navy, but throughout the 1920s and early 1930s, the RAN was drastically reduced in size due to a variety of factors including political apathy and economic hardship as a result of the Great Depression. In this time the focus of Australia's naval policy shifted from defence against invasion to trade protection, and several fleet units were sunk as targets or scrapped. By 1923, the size of the navy had fallen to eight vessels, and by the end of the decade it had fallen further to five, with just 3,500 personnel. In the late 1930s, as international tensions increased, the RAN was modernised and expanded, with the service receiving primacy of funding over the Army and Air Force during this time as Australia began to prepare for war.
Early in the Second World War, RAN ships again operated as part of Royal Navy formations, many serving with distinction in the Mediterranean, the Red Sea, the Persian Gulf, the Indian Ocean, and off the West African coast. Following the outbreak of the Pacific War and the virtual destruction of British naval forces in south-east Asia, the RAN operated more independently, or as part of United States Navy formations. As the navy took on an even greater role, it was expanded significantly and at its height the RAN was the fourth-largest navy in the world, with 39,650 personnel operating 337 warships. A total of 34 vessels were lost during the war, including three cruisers and four destroyers.
After the Second World War, the size of the RAN was again reduced, but it gained new capabilities with the acquisition of two aircraft carriers, Sydney and Melbourne. The RAN saw action in many Cold War–era conflicts in the Asia-Pacific region and operated alongside the Royal Navy and United States Navy off Korea, Malaysia, and Vietnam. Since the end of the Cold War, the RAN has been part of Coalition forces in the Persian Gulf and Indian Ocean, operating in support of Operation Slipper and undertaking counter piracy operations. It was also deployed in support of Australian peacekeeping operations in East Timor and the Solomon Islands.
The high demand for personnel in the Second World War led to the establishment of the Women's Royal Australian Naval Service (WRANS) branch in 1942, where over 3,000 women served in shore-based positions. The WRANS was disbanded in 1947, but then re-established in 1951 during the Cold War. It was given permanent status in 1959, and the RAN was the final branch to integrate women in the Australian military in 1985.