It is no secret that everyone on earth will physically die at some point. Although as Christians we already possess eternal life, we also know that our mortal bodies will one day fail and we will be absent from our body and be present with the Lord. However, many people wonder if we all have an appointed time of death and if God knows when we will die. As always, we can look to God’s Word  to provide us with the answers.
Does God know when we will die?
The first question we will answer is if God knows when we will die. This is because we are asking two different questions. Knowing when someone dies is not necessarily the same as appointing our time of death. To answer this question, we first have to know if God has the ability to foreknow things before they happen. The Bible teaches that God is all knowing or knows everything (1 John 3:20) (1). God knows everything about creation (Isaiah 40:28; Matthew 10:29; Psalms 94:11). God knows everything about the past, the present, and the future (Acts 15:18; 1 Peter 1:20; 1 Kings 13:2). God knows about what could have happened in history (Matthew 11:23). In addition to being all knowing, God is all powerful. When it comes to death, God even has power over death (Psalms 33:18-19; Psalms 56:11-13; Isaiah 25:8; Acts 2:22-24; 1 Corinthians 15:54-55; Ephesians 1:19- 21; Revelation 1:18). Therefore, God, has foreknowledge or knowledge of things yet to come, including our death (Romans 8:29-30).
Is our death appointed?
Since we have determined by God’s Word that God knows when we will die, another question now can be answered – Is our death appointed? I suppose you could break this down even further and ask if God has any control over when we die? The Bible teaches us that we all are appointed to die: “And as it is appointed unto men once to die, but after this the judgment” (Hebrews 9:27). Likewise, Jesus even said to Peter that if He willed that John would live until He returned, what is it to Peter (John 21:20-23)? Some have used this verse to support the notion that God allowed John to live until He saw the second coming of the Lord in his Revelation vision from Christ. Verse 23 says specifically that this is not what Jesus meant. However, it does illustrate the point that Jesus had the power to determine how long we shall live. (See also Exodus 20:12; Proverbs 3:1-2; Ecclesiastes 8:1-8; Ephesians 6:1-3).
Is there an appointed way we will die?
In addition to us being appointed to die, God also has appointed that many of us will die in specific ways for specific reasons as He did with the Apostles, “For I think that God hath set forth us the apostles last, as it were appointed to death: for we are made a spectacle unto the world, and to angels, and to men” (1 Corinthians 4:9). God appointed that Judas would die a certain way and his lineage would be cut off (Psalms 69:21-28; Psalms 109). (See also Numbers 14:35; Numbers 26:64-65; Psalms 136:10-13; Romans 9:17-22).
What is God’s attitude about death?
Some people think that God is evil because he allows innocent people to die. The first thing to consider is that God’s view of death and innocence is not like ours (Romans 1:18-23, 32). First, for those who mourn because of the death of their loved ones, it saddens God (John 11:31-44). Yet, for those that have rejected God, there is a terrible end (Romans 6:23; Revelation 20:12-15). However, for those that have not reached the age of accountability (Matthew 18:3-4, 14) and those who have trusted Christ as their Savior, physical death is the day that we get to see God face to face, perfect, even as Jesus is perfect (Ephesians 4:11-15). For this reason, the day of our death is a precious day to God (Psalms 116:15). For the non-believer, this is a disturbing thought and they often will try to equate this thinking with a sick and twisted mind. This is because they see our physical, temporary life as what is most precious. Sadly, these same people are often the same people who argue in support of assisted suicide. However, what they do not consider is that for the believer, although we look forward to being in the presence of the Lord, we know that He has a purpose  for us on this earth (2 Corinthians 5:1-11). Therefore, believers should live their lives in service to the Lord until He decides to call us home (Romans 12:1-2).
Does God have an appointed time of our death?
We see that God knows when we will die. God knows how we will die. We even see God’s attitude toward physical death. The question is, has He appointed the time of our death? The Bible tells us that God has numbered our days (Psalms 39:4-5; Psalms 102:23-24). Likewise, we do not know when the time that God has appointed for us to die will arrive, but there is a season that he has determined for it. We see this in Ecclesiastes 3:1-2, 17 and Job 14:1-5 as follows:
To every thing there is a season, and a time to every purpose under the heaven: A time to be born, and a time to die; a time to plant, and a time to pluck up that which is planted; (Ecclesiastes 3:1-2) … I said in mine heart, God shall judge the righteous and the wicked: for there is a time there for every purpose and for every work. (Ecclesiastes 3:17)
Man that is born of a woman is of few days, and full of trouble. He cometh forth like a flower, and is cut down: he fleeth also as a shadow, and continueth not. And dost thou open thine eyes upon such an one, and bringest me into judgment with thee? Who can bring a clean thing out of an unclean? not one. Seeing his days are determined, the number of his months are with thee, thou hast appointed his bounds that he cannot pass; (Job 14:1-5)
God knows when we will die. God knows how we will die. God’s attitude toward physical death is not like ours. Therefore, God has an appointed time of our death. We do not know when this time is, but He wants us to live each day to its fullest because we do not know if today will be our last day upon the earth (Ephesians 5:15-16; James 4:13-15).
Something more for you to read on this subject: What Does the Bible Say About Death? 
Resources – Scripture quotations are from The Holy Bible, King James Version. (1) Williams, Michael, (2013). Bible Doctrines. Albuquerque, NM: Selah Mountain Bible Institute (Page 23).