Becoming a citizen is the final step in the long journey of the immigration process. When calculating time you have lived in Canada, you can only count time spent after you became a permanent resident of Canada.
You must have been physically present in Canada as a permanent resident for at least 1,460 days during the six years immediately before the date of your application. You must also be physically present for at least 183 days during each of four calendar years that are fully or partially within the six years immediately before the date of application. These requirements do not apply to children under 18 and certain Crown servants and certain family members of Crown servants.
Those who have served in or with the Canadian Armed Forces might be able to apply through a fast-track process. This is based on how long you have served Canada, instead of how long you have lived in Canada. Foreign military members do not need to be a permanent resident of Canada.