A method for determining a transport block size, comprising: obtaining a target overhead value based on a target time-frequency resource and one or more of at least two overhead values, wherein the target time-frequency resource is used for uplink data transmission or downlink data transmission, and comprises one or more time-frequency resource units, and each of the overhead values is corresponding to at least one time-frequency resource unit; and determining a transport block size based on the target overhead value, wherein the determining a transport block size based on the target overhead value comprises: determining reference resource element information based on the target overhead value, wherein the reference resource element information is a value of a quantity of reference resource elements that is used to calculate the transport block size; and determining the transport block size based on the reference resource element information, resource block information, a modulation scheme, and a bit rate, wherein the resource block information is determined based on the target time-frequency resource; and wherein each of the overhead values corresponding to at least one time-frequency resource unit is a quantity of resource elements, REs, that cannot be used for data transmission in the time-frequency resource unit, or a quantity of REs that cannot be used for data transmission other than a quantity of REs of a demodulation reference signal. obtaining a target overhead value based on a target time-frequency resource and one or more of at least two overhead values, wherein the target time-frequency resource is used for uplink data transmission or downlink data transmission, and comprises one or more time-frequency resource units, and each of the overhead values is corresponding to at least one time-frequency resource unit; and determining a transport block size based on the target overhead value, wherein the determining a transport block size based on the target overhead value comprises: determining reference resource element information based on the target overhead value, wherein the reference resource element information is a value of a quantity of reference resource elements that is used to calculate the transport block size; and determining the transport block size based on the reference resource element information, resource block information, a modulation scheme, and a bit rate, wherein the resource block information is determined based on the target time-frequency resource; and wherein each of the overhead values corresponding to at least one time-frequency resource unit is a quantity of resource elements, REs, that cannot be used for data transmission in the time-frequency resource unit, or a quantity of REs that cannot be used for data transmission other than a quantity of REs of a demodulation reference signal. determining reference resource element information based on the target overhead value, wherein the reference resource element information is a value of a quantity of reference resource elements that is used to calculate the transport block size; and determining the transport block size based on the reference resource element information, resource block information, a modulation scheme, and a bit rate, wherein the resource block information is determined based on the target time-frequency resource; and wherein each of the overhead values corresponding to at least one time-frequency resource unit is a quantity of resource elements, REs, that cannot be used for data transmission in the time-frequency resource unit, or a quantity of REs that cannot be used for data transmission other than a quantity of REs of a demodulation reference signal.