Arduino can't multiply? I have a value I'm taking from a sensor module, which is 2500 when the sensor is facing a light source. This reads to my code and can be saved perfectly fine. When I try to find the weighted average of a set of values (2500*1000+2500*2000+2500*3000 etc), the Arduino comes out with very weird answers. For example

2500*1000=9632

If I just compute 2500*1000 on its own, the answer still comes out the same! The results come out negative if I use int so I switched to using double (just in case the values created were too big), this stops producing negatives as expected but the result is still like it is above.. I have no idea why.. any ideas?
2500 * 1000 = 9632 is exactly what you expect with 16-bit integers. You
should use long integers instead:

2500L * 1000L == 2500000L


Floats work also, but are more expensive:

2500.0 * 1000.0 == 2500000.0


although I do not recommend testing for exact equality of floats (it
works here because these numbers are exactly representable).