iso_fortran_env exposes named kind constants. real32 is 32-bit (kind 4) and real64 is 64-bit (kind 8) on common platforms.

Program

Play the program to print the kind numbers behind real32 and real64.

kinds.f90
program kinds_demo
    use iso_fortran_env, only: real32, real64
    implicit none
    integer :: k32, k64
    k32 = real32
    k64 = real64
    print '(I0, A, I0)', k32, " ", k64
end program kinds_demo
iso_fortran_env Standard module exposing portable kind constants.
real32 / real64 Named constants for 32-bit and 64-bit real kinds.
only: `only:` imports just the names you need.