Total ammonia nitrogen (TAN) is a pollutant agent found in water and generated from the metabolisms of living organisms and the decomposition of organic matter. This research aims to develop an efficient, low-cost, and environmentally friendly TAN analysis method. The principle of this method is based on the reaction of TAN injected in the donor stream with NaOH to form alkaline gaseous ammonia. The gaseous ammonia diffuses through a hydrophobic membrane into an acceptor stream containing Ruellia tuberosa extract. The presence of NH3 gas in the acceptor stream changes the extract color from pinkish to green, which is monitored by spectrophotometer at 620 nm. This method was also validated based on linearity, selectivity, and accuracy. Under the obtained optimum conditions of 1 M NaOH, 5% extract, a 120 cm mixing coil, and a 200 µL sample volume, the proposed method showed excellent linearity at 10–1000 ppm (R2 = 0.993). The selectivity test result shows that this method was selective against sulfite and nitrite compounds up to 600 ppm with a % error value <10%. This method was applied to measure the total ammonia concentration in agricultural water, and satisfying results were shown by high recoveries of 95.03%–98.84%.