In this paper we study bond percolation on a one-dimensional chain with power-law bond probability C/rd+Ï , where r is the distance length between distinct sites and d=1. We introduce and test an order-N Monte Carlo algorithm and we determine as a function of Ï the critical value Cc at which percolation occurs. The critical exponents in the range 0<1 are reported. Our analysis is in agreement, up to a numerical precision â 10-3, with the mean-field result for the anomalous dimension η=2-Ï , showing that there is no correction to η due to correlation effects. The obtained values for Cc are compared with a known exact bound, while the critical exponent Î1⁄2 is compared with results from mean-field theory, from an expansion around the point Ï =1 and from the expansion used with the introduction of a suitably defined effective dimension deff relating the long-range model with a short-range one in dimension deff. We finally present a formulation of our algorithm for bond percolation on general graphs, with order N efficiency on a large class of graphs including short-range percolation and translationally invariant long-range models in any spatial dimension d with Ï >0.