In the present study, the buckling and postbuckling behaviors of beams having initially small sinusoidal imperfection with pinned ends subjected to sinusoidal loading are examined by using Euler-Bernoulli beam theory. The governing differential equations of the geometrically nonlinear problem consisting of the equilibrium equations, kinematical equations and the constitutive equations are converted into algebraic equations via the finite differences and solved numerically by using the Newton-Raphson method. The values of buckling loads and buckling deflections are determined by drawing load-deflection curves. The effect of the initial imperfection on the buckling values is investigated. It is seen that as the value of the small initial imperfection is increased, the buckling force is increased and buckling deflection is decreased. Unlike previous studies on the subject, the diagrams of the deformed shapes of the beam having initially small imperfection as well as the diagrams of the internal forces at various stages of the deformation including the prebuckling, buckling and postbuckling states are presented for various values of the initial imperfection.