How old do I need to be and how long after baptism do I wait until I can go to the Temple? When am I ready and prepared? (Done)
That depends. Any member over the age of 12 can get a temporary recommend to perform baptisms for the dead, after an interview with the Bishop. It is extremely rare, if it happens at all nowadays, for someone to receive their endowment before the age of 18. Helping people be adequately prepared has been a problem since the early days of the Church, and so the age requirement has risen.
Generally, one must have been a member in good standing for at least 1 year as measured from the date of confirmation (not baptism), and men must receive the Melchizedek priesthood before attending the Temple. Since missionaries normally are endowed before leaving on their missions, this means that men tend to receive their endowment around age 19, and women who choose to serve a mission around age 21. Others may receive their endowment as they and their leaders feel they are ready, though how one determines readiness may vary from person to person, and priesthood leader to priesthood leader. President Joseph Fielding Smith taught that
Children should not go to the Temple until they are old enough to understand the purpose of their going. They should be taught the principles of the gospel, and to have faith in God, and in the mission of Jesus Christ, and should gain a testimony of the truth before they receive the blessings of the Temple. I believe that a young man or a young woman should seek after these blessings in the Temple, and just as soon as they are old enough to understand the meaning of Temple ordinances, they should have them. Moreover, they should not go to the Temple until they do have a testimony of the truth and a knowledge of the gospel, no matter how old they may be. It is not intended that these sacred covenants should be given to those who do not have faith and who have not proved themselves worthy by obedience to the gospel. – Doctrines of Salvation, 2:253-4.
Similarly, Elder Packer wrote that
The ordinances and ceremonies of the temple are… sacred. They are kept confidential lest they be given to those who are unprepared. Curiosity is not a preparation. Deep interest itself is not a preparation. Preparation for the ordinances includes preliminary steps: faith, repentance, baptism, confirmation, worthiness, a maturity and dignity worthy of one who comes invited as a guest into the house of the Lord. All who are worthy and qualify in every way may enter the temple, there to be introduced to the sacred rites and ordinances. – “The Holy Temple,” Ensign, Feb. 1995, 32.
©