This paper presents a novel polyphase-basis discrete cosine transform that can be used for challenges to observe heart rate (HR) variability and sudden changes of HR in short time. To succeed in the challenges, real-time measurement which requires a short window length is needed. As the window length decreases, however, increased main-lobe width (MLW) and sidelobe width (SLW) result errors in measuring HR. Unlike commonly used discrete Fourier transform (DFT), the proposed method is based on DCT, which improves the accuracy of measured HR even though the short window length is used for the real-time measurement of HR. We demonstrate that the DCT can give 2 times shorter MLW and SLW than the DFT can. To verify the proposed method, it is compared with well-known existing methods, arctangent demodulation and complex signal demodulation, which use the DFT. We measured HR using a 10.225-GHz continuous-wave Doppler radar. In each experiment, the window lengths of 3, 2, and 1.5 s were used to measure HR in real time. Experimental results show that the proposed method has lower mean and standard deviation of errors than the existing methods have.