The exact formula for the time elapsed since the big bang is the integral
$$t=\int_0^a \frac{{\rm d}a'}{a' \ H(a')}$$
where $H(a)$ is composed of the radiation density $\Omega_R$, the matter (dark+regular) density $\Omega_M$, the curvature $\Omega_K$ and the dark energy density $\Omega_{\Lambda}$:
$$H(a)=H_0 \ \sqrt{\Omega_R/a^4+\Omega_M/a^3+\Omega_K/a^2+\Omega_{\Lambda}}$$
If you're looking for the age of the universe today set $a=1$, if you want to know how old the universe was when the scale factor was half of today set $a=1/2$ and if you're looking for the age of the universe when the scale factor will be twice that of today set $a=2$.
Those are the Friedmann equations which are also used in the ΛCDM-model. With $H_0=67150 \ {\rm m/Mpc/sec}$, $\Omega_R=10^{-4}$ (including neutrinos, radiation alone would be 5e-5), $\Omega_M=0.315$, $\Omega_K=0$, $\Omega_{\Lambda}=1-\Omega_R-\Omega_M-\Omega_K$ this gives
$$t=13.841 \ {\rm Gyr}$$
When $t=f/H_0$ the function $f$ becomes
$$f=\int_0^a \frac{{\rm d}a'}{\sqrt{\Omega_R/a'^2+\Omega_M/a'+\Omega_K+\Omega_{\Lambda} \ a'^2}}$$
Since there is no closed solution to this integral except when you set $\Omega_M+\Omega_{\Lambda}=1$ and all the other $\Omega$ to $0$ which reduces the equation for $a$ to
$$a=\sqrt[3]{\left(\sqrt{\frac{\Omega_M}{\Omega_{\Lambda} }} \sinh \left(\frac{t \left(3 H_0 \sqrt{\Omega_{\Lambda} }\right)}{2} \right)\right)^2}$$
and therefore $t$ to
$$t=\frac{2 \sinh ^{-1}\left(\sqrt{\frac{a^3 \Omega_{\Lambda} }{\Omega_M}}\right)}{3 H_0 \sqrt{\Omega_{\Lambda} }}$$
you should use numerical integration instead of symbolic one when solving for the exact solution containing all the $\Omega$s.
With $a=1/(z+1)$ (dependend on the redshift instead of the scalefactor) the equations are referenced here: ned.ipac.caltech.edu/level5/Hogg/Hogg10.html and here: lcdm.yukterez.net