Encoder with Gear Ratio

Hello i have an PWM encoder (AS5048A) attached to 4:1 gear box.
4 rotations of encoder is 1 rotation of wheel.
Encoder values are 0 - 900 for full rotation.
How to calculate angle of wheel?
I cannot find a solution.
Thank you very much!

Which encoder? Datasheet or link please.

I would start by measuring the angle of the encoder. Then divide by 4.

We need more information. You need some way to set a zero stop so you have a reference. Otherwise, any value of the encoder can be any of 4 wheel positions and there is no way to narrow it down.

I don't get it.

According to the datasheet at http://ams.com/eng/content/download/438523/1341157/143015
the AS5048A has a PWM output and a 14 bit (16384 counts) SPI output. This does not square with the OP's claimed count from 0 to 900.

The zero point is programmable via SPI. The number of times that the encoder overflows must be tracked. Simply dividing the encoder value by 4 does not work if the encoder rotates four times for every single rotation of the wheel.

The conversion from number of overflows and count to wheel rotation is very simple. I believe that it is (untested):

(overflows % 4) * 90.0 + 90.0 * counts / 16384.0

where
overflows is an unsigned int
% represents the modulus operator
counts is an int or an unsigned int or a float or...
and overflows is set back to zero when it gets to be some multiple of four.

If overflows is set back to zero every time it would be incremented from 3, then (overflows % 4) becomes simply overflows.
If overflow is incremented by 90 each time, and is set back to zero when it would be incremented from 270, then (overflows % 4) * 90.0 becomes simply overflows.

Of course, this assumes counting from 0 to 16383, immediately followed by 0 again.
If the count is from 0 to 900 (901 counts per revolution?!), then the formula is slightly different.