The final tally from all 88 channels showed Dr Wan Azizah securing 16,741 votes while Barisan Nasional's Datin Paduka Chew Mei Fun garnered 11,362 votes (5,379 vote majority).
The voter turnout for the by-election was 72 percent (28,314 voters) compared to a turnout of 87.9 percent in the May 5 general election last year.
After the result was announced, Dr Wan Azizah thanked voters for their support, noting especially the increased in turnout of young voters.
The Kajang seat, with a total 39,728 registered voters, fell vacant following the resignation of its PKR assemblyman Lee Chin Cheh.
In 2013, PKR's Lee garnered 19,571 votes followed by Lee Ban Seng (BN-MCA) with 12,747 votes and Mohamad Ismail (Berjasa) 1,014 votes.
The three independent candidates who contested the seat are Mohd Iwan Jefrey Abdul Majib (249 votes), Ong Yan Foo (85 votes) and Mohd Khalid Kassim (83 votes). Lee won the seat with a comfortable 6,824 vote majority.