The
freebsd-version utility should provide the correct answer in the vast
majority of cases, including on systems kept up-to-date using
freebsd-update(8), which does not update the kernel version unless the
kernel itself was affected by the latest patch.