Hi,
What is the square wave for, and where is the circuit?
The LM324 has a slew rate of about 0.5v/us, so that means it is limited as to the max peak of a sine wave that can pass through it cleanly.
The formula is:
SR=Vpk*2*pi*f/1e6
where
SR is the slew rate in volts per microsecond,
Vpk is the peak of the sine,
f is the frequency,
pi=3.14159
So for a 1MHz sine with a 1v peak we would need 2*pi which is about 6 volts per microsecond slew rate. For a 1.5v peak we'd need about 9v/us slew rate. The LM324 can only do about 0.5v/us, which is 18 times less so the max frequency would be 1MHz divided by 18 (at the same 1.5v peak).