A very easy way is to include following line before after writing bibliography, i.e., after the command \bibliography
in standard LaTeX or after the command \printbibliography
using the package biblatex.
\addcontentsline{toc}{chapter}{Bibliography}
here is the original post:
Insert bibliography into table of content
For example, in standard LaTeX
\documentclass{book}
\begin{document}
\tableofcontents
\include{chapter1}
\bibliographystyle{plain}
\bibliography{biblio}%writing the bibliography
\addcontentsline{toc}{chapter}{Bibliography}%Including it as a chapter
\end{document}
Or with the package biblatex
\documentclass{book}
\usepackage[style=plain]{biblatex}
\addbibresource{biblio}
\begin{document}
\tableofcontents
\include{chapter1}
\printbibliography%Writing the bibliography
\addcontentsline{toc}{chapter}{Bibliography}%Including it as a chapter
\end{document}