Title: Independence Day (Pakistan)
Content:  Independence Day (Yāum-e-Āzādi), observed annually on 14 August, is a national holiday in Pakistan. It commemorates the day when Pakistan achieved independence and was declared a sovereign state following the end of the British Raj in 1947. Pakistan came into existence as a result of the Pakistan Movement, which aimed for the creation of an independent Muslim state in the north-western regions of British India via partition. The movement was led by the All-India Muslim League under the leadership of Muhammad Ali Jinnah. The event was brought forth by the Indian Independence Act 1947 under which the British Raj gave independence to the Dominion of Pakistan which comprised West Pakistan (present-day Pakistan) 
Title: Political history of Pakistan
Content:  The political history of Pakistan is the narrative and analysis of political events, ideas, movements, and leaders of Pakistan. Pakistan gained independence from the United Kingdom on 14 August 1947, when the Presidencies and provinces of British India was divided by the United Kingdom, in a region which is commonly referred to as the Indian subcontinent. Since its independence, Pakistan has had a colorful yet turbulent political history at times, often characterized by martial law and inefficient leadership.
Title: History of Pakistan (1947–present)
Content:  On 14 August 1947 (27th of Ramadan in 1366 of the Islamic Calendar) Pakistan gained independence. India gained independence the following day. Two of the provinces of British India, Punjab and Bengal, were divided along religious lines by the Radcliffe Commission. Lord Mountbatten is alleged to have influenced the Radcliffe Commission to draw the lines in India's favour. Punjab's mostly Muslim western part went to Pakistan and its mostly Hindu and Sikh eastern part went to India, but there were significant Muslim minorities in Punjab's eastern section and light Hindus and Sikhs minorities living in Punjab's western areas. There was 
Title: 1952 in Pakistan
Content: August 14 – Pakistan celebrates 5 years of independence. 
Title: 1967 in Pakistan
Content: 14 August, Pakistan celebrates its 20th year of independence. 
Title: Independence Day (Pakistan)
Content:  interests of the Muslim diaspora in British India, the Muslim League played a decisive role during the 1940s in the Indian independence movement and developed into the driving force behind the creation of Pakistan as a Muslim state in South Asia. During a three-day general session of All-India Muslim League from 22–24 March 1940, a formal political statement was presented, known as the Lahore Resolution, which called on for the creation of an independent state for Muslims. In 1956, 23 March also became the date on which Pakistan transitioned from a dominion to a republic, and is known as Pakistan Day.
Title: Independence Day (Pakistan)
Content:  Since the transfer of power took place on the midnight of 14 and 15 August, the Indian Independence Act 1947 recognized 15 August as the birthday of Pakistan. The act states; "'As from the fifteenth day of August, nineteen hundred and forty-seven, two independent Dominions shall be set up in India, to be known respectively as India and Pakistan.'" Jinnah in his first broadcast to the nation stated; "'August 15 is the birthday of the independent and sovereign state of Pakistan. It marks the fulfillment of the destiny of the Muslim nation which made great sacrifices in the past few years to have its homeland.'" The first commemorative postage stamps of the country, released in July 1948, also gave 15 August 1947 as the independence day, however in subsequent years 14 August was adopted as the independence day. This is because Mountbatten administered the independence oath to Jinnah on the 14th, before leaving for India where the oath was scheduled on the midnight of the 15th. The night of 14–15 August 1947 coincided with 27 Ramadan 1366 of the Islamic calendar, which Muslims regard as a sacred night.
Title: Foreign relations of Pakistan
Content:  After Pakistan gained its independence in August 1947, the Commonwealth were the first countries to recognize its sovereign status. The United States was the first non-Muslim country to recognize Pakistan and France was the first country where Pakistan's flag was raised.
Title: 1997 in Pakistan
Content: 14 August – Pakistan celebrates 50 years of independence from British rule. 
Title: Pakistan–United Kingdom relations
Content:  Formerly part of the British Empire, Pakistan became independent from the UK in 1947 under the terms of the Indian Independence Act. At this point the Dominion of Pakistan was still nominally part of the British Empire, until it became a separate Republic in 1956. Pakistan left the Commonwealth of Nations in 1972 in protest of the organisation's recognition of Bangladeshi independence, before rejoining in 1989. In 2018, Pakistan and the United Kingdom signed the UK-Pakistan Prisoner Transfer Agreement allowing foreign prisoners in both countries to serve their sentences in home country.

Question: when did pakistan get its independence?
Answer: 1947.