In the realm of epidemiological modeling, the intricacies of epidemic dynamics are elucidated through the lens of compartmental models, with the SIR (Susceptible-Infectious-Recovered) and its variant, the SIS (Susceptible-Infectious-Susceptible) model, being pivotal. This investigation delves into both deterministic and stochastic frameworks, casting the SIR model as a continuous-time Markov chain (CTMC) in stochastic settings. Such an approach facilitates simulations via Gillespie's algorithm and integration of stochastic differential equations. The latter are formulated through a bivariate Fokker-Planck equation, originating from the continuous limit of the master equation. A focal point of this study is the distribution of extinction time, specifically, the duration until recovery in a population with an initial count of infected individuals. This distribution adheres to a Gumbel distribution, viewed through the prism of a birth and death process. The stochastic analysis reveals several insights: firstly, the SIR model as a CTMC encapsulates random fluctuations in epidemic dynamics. Secondly, stochastic simulation methods, either through Gillespie's algorithm or stochastic differential equations, offer a robust exploration of disease spread variability. Thirdly, the precision of modeling is enhanced by the incorporation of a bivariate Fokker-Planck equation. Fourthly, understanding the Gumbel distribution of extinction time is crucial for gauging recovery periods. Lastly, the non-linear nature of the SIR model, when analyzed stochastically, enriches the comprehension of epidemic dynamics. These findings bear significant implications for epidemic mitigation and recovery strategies, informing healthcare resource planning, vaccine deployment optimization, implementation of social distancing measures, public communication strategies, and swift responses to epidemic resurgences.