The wheel differencer... (Offset calculator)

Will S14 wheels (5-lug) clear an S13 that has coilovers and Z32 30mm
brakes?

I wrote a cheezy script to do some calculations:

http://son240sx.ca/wheelcalc.php

Basically comparing an S13 wheel (15x6 +40) to an S14 5-lug wheel
(16x6.5 +40), the S14 wheel is clearly inside the wheel well more by 2.5"
(or 6.35mm).

Now spoke design as well as offset determine clearance so I’m curious to
know whether these will still clear everything?

Here’s the code to determine how much further inside or outside the wheel
well the new wheel is:


// Commented out...
// $size1 = 15
// $width1 = 6
// $offset1 = 40

// $size2 = 16
// $width2 = 6.5
// $offset2 = 40


    $clearance = (($width1/2) + ($offset1/25.4)) - (($width2/2) + ($offset2/25.4));