A method and an arrangement of tracking a maximum power point of a photovoltaic system, in which method an operation point of the photovoltaic system is changed based on the change of operation point and a change of power generated by the photovoltaic system, the method comprising repeatedly determining a current or voltage of the photovoltaic system, determining a power of the photovoltaic system, determining a change of power of the photovoltaic system with respect to a previous determined power, changing the operation point of the photovoltaic system by changing a current or voltage reference of the system stepwise depending on the change of power and a direction of a previous change of the current or voltage reference. The method comprises further storing the determined values of current or voltage and the determined power of the photovoltaic system together with a time value, wherein the determination of the change of power (P) of the photovoltaic system comprises reading from the stored values a previous value of determined power and its time value having a current or voltage value equalling a present current or voltage value, calculating the change of power from the current value of power (P(k)), previous value of power (P(k-1)), stored value of power (P(m)) having a current or voltage value corresponding to a present current or voltage, and the time value (m) of the stored value of power (P(m)).