An adaptive, a variable code rate,can respond to channel changes promptly channel coding method is proposed,a discrete memoryless binary source sequence 𝑿 is transformed losslessly to make it capable of error checking. After the transformation, 𝑿 has variable and fixed code rates through weighted probability arithmetic coding. Compared with a fixed code rate, a variable code rate can respond to channel changes promptly and effectively improve the transmission performance, thereby being suitable for more complex communication environments. We prove that when the code length is long enough, the decoding error probability of the weighted probability arithmetic coding is 0 and the encoding rate can reach 1. When the symbols in the sequence 𝑿 are uniformly distributed, the transmission rate can reach the channel capacity. In an additive-white-Gaussian-noise channel binary-phase-shiftkeying signal simulation experiment, the error correction performances under various fixed code rates were compared. When the fixed code rate was 0.5 and the block error rate (BLER) was 10 −3 the weighted probability arithmetic coding improved by 0.37 dB compared to that obtained using Polar CA-SCL, and when BLER was 10 −5 , it improved by 0.48 dB. The algorithm can be widely used in communication systems, data storage, and other fields.