Size of Basic Types

The intrinsic data types are INTEGER, REAL, LOGICAL, COMPLEX, and CHARACTER, whose sizes are shown in the following table.

Data Types and Storage Sizes

Types Number of Bytes
INTEGER(1), LOGICAL(1), CHARACTER 1
INTEGER(2), LOGICAL(2) 2
INTEGER, LOGICAL, REAL Depending on default integer size (set by the /integer_size compiler option or equivalent directive) , INTEGER and LOGICAL can have 2, 4, or 8 bytes; default allocation is 4 bytes.

Depending on default real size (set by the /real_size compiler option or equivalent directive), REAL can have 4 or 8 bytes; default allocation is 4 bytes.

INTEGER(4), REAL(4), LOGICAL(4) 4
INTEGER(8), LOGICAL(8) 8
COMPLEX Depending on default real, COMPLEX can have 8 or 16 bytes; default allocation is 8 bytes.
DOUBLE PRECISION, REAL(8), COMPLEX(4) 8
DOUBLE COMPLEX, COMPLEX(8) 16
CHARACTER(n) n
Structures Size of derived type (can be affected by the PACK directive)
RECORD Size of record structure (can be affected by the PACK directive)