The dipole moments (mu), polarizabilities (alpha), hyperpolarizabilities (beta) and second-order hyperpolarizabilities (gamma) of polyenes, polyynes, and polyphenyls have been calculated by a finite-field method with the PM-3 parameterization of the semiempirical MNDO Hamiltonian at the optimum geometries. These results were compared to experimental values obtained from EFISH and THG measurements. The calculations reproduce the magnitudes of beta and gamma, as well as the effect of the substituents and the effect of bond alternation on beta and gamma. The coefficients of the power law, which describes the dependence of beta and gamma on the number of pi centers, were calculated. For beta, exponents of 1.5-2.2 and 0.03-0.04 were obtained for polyenes and polyynes, respectively, and for gamma, exponents of 3.9-4.9, 2.9-3.3, and 2.5-2.7 were obtained for polyenes, polyynes, and polyphenyls, respectively. These results confirm the efficiency of enhancing gamma by insertion of C=C double bonds into a chain.