For a single-phase active power filter (APF), designing a more efficient algorithm to guarantee accurate and fast harmonics extraction with a lower computing cost is still a meaningful topic. The common idea still employs a IRPT-based Park transform, which was originally designed for 3-phase applications. Therefore, an additional virtual signal generation (VSG) link is necessary when it is used in the single-phase condition. This method, with virtual signal generation and transform, is obviously not the most efficient one. Regarding this problem, this paper proposes a novel harmonics extraction algorithm to further improve efficiency. The new algorithm is based on the principle of trigonometric orthogonal functions (TOF), and its mathematical principle and physical meaning are introduced in detail. Its implementation and superiority in terms of computation efficiency are analyzed by comparing it with conventional methods. Finally, its effectiveness is well validated through detailed simulations and laboratory experiments.